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
            
__builtin__.object
StringI
StringO
 
InputType = class StringI(__builtin__.object)
      Simple type for treating strings as input file streams
 
   Methods defined here:
__iter__(...)
x.__iter__() <==> iter(x)

Methods inherited from __builtin__.object:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__hash__(...)
x.__hash__() <==> hash(x)
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
__reduce__(...)
helper for pickle
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__str__(...)
x.__str__() <==> str(x)

Data and non-method functions inherited from __builtin__.object:
__class__ = <type 'type'>
the object's class
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
 
OutputType = class StringO(__builtin__.object)
      Simple type for output to strings.
 
   Methods inherited from __builtin__.object:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__hash__(...)
x.__hash__() <==> hash(x)
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
__reduce__(...)
helper for pickle
__repr__(...)
x.__repr__() <==> repr(x)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__str__(...)
x.__str__() <==> str(x)

Data and non-method functions inherited from __builtin__.object:
__class__ = <type 'type'>
the object's class
__new__ = <built-in method __new__ of type object>
T.__new__(S, ...) -> a new object with type S, a subtype of T
 
Functions
            
StringIO(...)
StringIO([s]) -- Return a StringIO-like stream for reading or writing
 
Data
             __file__ = '/usr/lib/python2.2/lib-dynload/cStringIO.so'
__name__ = 'cStringIO'
cStringIO_CAPI = <PyCObject object>