March 2003
Intermediate to advanced
656 pages
39h 30m
English
StringIO
StringIO(str='')Creates and returns an in-memory file-like object
fl, with all methods and attributes of a
built-in file object. The data contents of
fl are initialized to be a copy of
argument str, which must be a plain string
for the StringIO factory function in
cStringIO, while it can be a plain or Unicode
string for the function in StringIO.
Besides all methods and attributes of built-in file objects, as
covered in Section 10.3.2 earlier in
this chapter, fl supplies one
supplementary method, getvalue.
Read now
Unlock full access