Did I find the right examples for you? yes no

All Samples(10282)  |  Call(10282)  |  Derive(0)  |  Import(0)
Retrieve the entire contents of the "file" at any time before
the StringIO object's close() method is called.

The StringIO object can accept either Unicode or 8-bit strings,
but mixing the two may take some care. If both are used, 8-bit
strings that cannot be interpreted as 7-bit ASCII (that use the
8th bit) will cause a UnicodeError to be raised when getvalue()
is called.

src/h/u/hunch-sample-app-HEAD/django/test/_doctest.py   hunch-sample-app(Download)
    exc_type, exc_val, exc_tb = exc_info
    traceback.print_exception(exc_type, exc_val, exc_tb, file=excout)
    return excout.getvalue()
 
# Override some StringIO methods.
class _SpoofOut(StringIO):
    def getvalue(self):
        result = StringIO.getvalue(self)

src/b/i/bitey-0.0/examples/mandel/png.py   bitey(Download)
    if os.environ.get('PYPNG_TEST_TMP'):
        w = open(name, 'wb')
        w.write(f.getvalue())
        w.close()
    return f.getvalue()
        f = StringIO()
        w.write_array(f, array('B', map(mask.__and__, range(1, 256))))
        r = Reader(bytes=f.getvalue())
        x,y,pixels,meta = r.read()
        self.assertEqual(x, 15)
        f = StringIO()
        w.write_array(f, array('B', range(4)))
        r = Reader(bytes=f.getvalue())
        x,y,pixels,meta = r.asRGB8()
        self.assertEqual(x, 1)
        f = StringIO()
        w.write_array(f, array('B', (0,1,1,2)))
        r = Reader(bytes=f.getvalue())
        x,y,pixels,meta = r.asRGB8()
        self.assertEqual(x, 1)

src/b/i/bitey-HEAD/examples/mandel/png.py   bitey(Download)
    if os.environ.get('PYPNG_TEST_TMP'):
        w = open(name, 'wb')
        w.write(f.getvalue())
        w.close()
    return f.getvalue()
        f = StringIO()
        w.write_array(f, array('B', map(mask.__and__, range(1, 256))))
        r = Reader(bytes=f.getvalue())
        x,y,pixels,meta = r.read()
        self.assertEqual(x, 15)
        f = StringIO()
        w.write_array(f, array('B', range(4)))
        r = Reader(bytes=f.getvalue())
        x,y,pixels,meta = r.asRGB8()
        self.assertEqual(x, 1)
        f = StringIO()
        w.write_array(f, array('B', (0,1,1,2)))
        r = Reader(bytes=f.getvalue())
        x,y,pixels,meta = r.asRGB8()
        self.assertEqual(x, 1)

src/n/e/neutron-drive-HEAD/google_appengine/lib/PyAMF/doc/tutorials/examples/gateways/appengine/demo/shell/gateway.py   neutron-drive(Download)
    buffer.write('>>> ')
 
    return buffer.getvalue()
 
  def startup(self, request):

src/p/y/PyMOTW-2.0.1/PyMOTW/StringIO/stringio_examples.py   PyMOTW(Download)
 
# Retrieve the value written
print output.getvalue()
 
output.close() # discard buffer memory

src/n/e/neutron-drive-HEAD/google_appengine/lib/PyAMF/doc/tutorials/examples/actionscript/shell/python/gateway.py   neutron-drive(Download)
      buffer.write(traceback.format_exc())
 
    return buffer.getvalue()
 
  def startup(self, request):

src/m/o/motionless-HEAD/examples/gpolyencode.py   motionless(Download)
 
        return (
            encoded_points.getvalue(), #.replace("\\", "\\\\"), 
            encoded_levels.getvalue()
        )
        num += 63
        s.write(chr(num))
        return s.getvalue()
 
    def _distance(self, p0, p1, p2):

src/c/i/circuits-3.0.0.dev/examples/web/terminal/terminal.py   circuits(Download)
                self._buffer.write(data)
                self._buffer.flush()
                data = self._buffer.getvalue()
                self._buffer = None
                self.fire(stream(self._response, data), "web")

src/p/y/PyAMF-0.6.1/doc/tutorials/examples/gateways/appengine/demo/shell/gateway.py   PyAMF(Download)
    buffer.write('>>> ')
 
    return buffer.getvalue()
 
  def startup(self, request):

src/p/y/pyamf-HEAD/doc/tutorials/examples/gateways/appengine/demo/shell/gateway.py   pyamf(Download)
    buffer.write('>>> ')
 
    return buffer.getvalue()
 
  def startup(self, request):

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