| cStringIO | index /usr/lib/python2.2/lib-dynload/cStringIO.so |
A simple fast partial StringIO replacement.
This module provides a simple useful replacement for
the StringIO module that is written in C. It does not provide the
full generality of StringIO, but it provides enough for most
applications and is especially useful in conjunction with the
pickle module.
Usage:
from cStringIO import StringIO
an_output_stream=StringIO()
an_output_stream.write(some_stuff)
...
value=an_output_stream.getvalue() # str(an_output_stream) works too!
an_input_stream=StringIO(a_string)
spam=an_input_stream.readline()
spam=an_input_stream.read(5)
an_input_stream.seek(0) # OK, start over
spam=an_input_stream.read() # and read it all
If someone else wants to provide a more complete implementation,
go for it. :-)
cStringIO.c,v 1.29 1999/06/15 14:10:27 jim Exp
| Classes | ||||||||||||||||||
| ||||||||||||||||||
| Functions | ||
| Data | ||
| __file__ = '/usr/lib/python2.2/lib-dynload/cStringIO.so' __name__ = 'cStringIO' cStringIO_CAPI = <PyCObject object> | ||