Module doctest :: Class _SpoofOut
[hide private]
[frames] | no frames]

_ClassType _SpoofOut

StringIO.StringIO --+
                    |
                   _SpoofOut

Instance Methods [hide private]
 
getvalue(self)
Retrieve the entire contents of the "file" at any time before the StringIO object's close() method is called.
 
truncate(self, size=None)
Truncate the file's size.

Inherited from StringIO.StringIO: __init__, __iter__, close, flush, isatty, next, read, readline, readlines, seek, tell, write, writelines

Method Details [hide private]

getvalue(self)

 

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.

Overrides: StringIO.StringIO.getvalue
(inherited documentation)

truncate(self, size=None)

 

Truncate the file's size.

If the optional size argument is present, the file is truncated to (at most) that size. The size defaults to the current position. The current file position is not changed unless the position is beyond the new file size.

If the specified size exceeds the file's current size, the file remains unchanged.

Overrides: StringIO.StringIO.truncate
(inherited documentation)