Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)
SimpleStringIO can replace a StringIO in write mode.

cStringIO reallocates and doubles the size of its internal buffer
when it needs to append new data which requires two large blocks for
large inputs. SimpleStringIO stores each individual blocks and joins
them once done. This might cause more memory fragmentation but
requires only one large block. In practice, ra.get_file() seems to
write in 16kB blocks (svn 1.7.5) which should be friendly to memory
allocators.

src/h/g/hgsubversion-1.6/hgsubversion/svnwrap/svn_swig_wrapper.py   hgsubversion(Download)
        mode = ''
        try:
            out = common.SimpleStringIO()
            info = ra.get_file(self.ra, path, revision, out)
            data = out.getvalue()

src/h/g/hgsubversion-1.6/hgsubversion/svnwrap/subvertpy_wrapper.py   hgsubversion(Download)
        mode = ''
        try:
            out = common.SimpleStringIO()
            rev, info = self.remote.get_file(path, out, revision)
            data = out.getvalue()