Did I find the right examples for you? yes no

All Samples(1744)  |  Call(1744)  |  Derive(0)  |  Import(0)
Read at most size bytes from the file
(less if the read hits EOF before obtaining size bytes).

If the size argument is negative or omitted, read all data until EOF
is reached. The bytes are returned as a string object. An empty
string is returned when EOF is encountered immediately.

src/a/s/astral-HEAD/examples/webcam_and_rtmp/amf.py   astral(Download)
    def read(self, length=-1):
        if length > 0 and self.eof(): raise EOFError # raise error if reading beyond EOF
        if length > 0 and self.tell() + length > self.len: length = self.len - self.tell() # don't read more than available bytes
        return StringIO.read(self, length)
    def peek(self):

src/d/j/django-navbar-0.3.0/examples/dbgp/client.py   django-navbar(Download)
                return None
            StringIO.StringIO.seek(self, 0)
            x = StringIO.StringIO.read(self, size)
            # remove what we read from the stream
            # this ensures that reading from the beginning

src/p/y/pysfml-cython-HEAD/examples/soundstream.py   pysfml-cython(Download)
                        sound_buffer.sample_rate)
        self.buffer_size = 2 ** 12
        self.next_data = self.string_buffer.read(self.buffer_size)
 
    def on_get_data(self, chunk):

src/p/y/PyMOTW-2.0.1/PyMOTW/StringIO/stringio_examples.py   PyMOTW(Download)
 
# Read from the buffer
print input.read()
 

src/h/u/hunch-sample-app-HEAD/django/core/handlers/wsgi.py   hunch-sample-app(Download)
        else:
            line = sio.readline()
        self.buffer = sio.read()
        return line
 

src/h/u/hunch-sample-app-HEAD/django/core/management/base.py   hunch-sample-app(Download)
        if num_errors:
            s.seek(0)
            error_text = s.read()
            raise CommandError("One or more models did not validate:\n%s" % error_text)
        if display_num_errors:

src/p/o/powerhose-0.7/examples/web_worker.py   powerhose(Download)
    pprint.pprint(environ, stream=printed)
    printed.seek(0)
    return page % printed.read()
 

src/x/l/XlsxWriter-0.5.3/examples/http_server_py2.py   XlsxWriter(Download)
        self.send_header('Content-type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
        self.end_headers()
        self.wfile.write(output.read())
        return
 

src/x/l/XlsxWriter-HEAD/examples/http_server_py2.py   XlsxWriter(Download)
        self.send_header('Content-type', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet')
        self.end_headers()
        self.wfile.write(output.read())
        return
 

src/p/o/powerhose-HEAD/examples/web_worker.py   powerhose(Download)
    pprint.pprint(environ, stream=printed)
    printed.seek(0)
    return page % printed.read()
 

  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9  Next