Trees | Index | Help |
|
---|
Package zope :: Package testing :: Module doctest :: Class _SpoofOut |
|
StringIO
--+
|
_SpoofOut
Method Summary | |
---|---|
Retrieve the entire contents of the "file" at any time before the StringIO object's close() method is called. | |
Truncate the file's size. | |
Inherited from StringIO | |
| |
| |
Free the memory buffer. | |
Flush the internal buffer | |
Returns False because StringIO objects are not connected to a tty-like device. | |
A file object is its own iterator, for example iter(f) returns f (unless f is closed). | |
Read at most size bytes from the file (less if the read hits EOF before obtaining size bytes). | |
Read one entire line from the file. | |
Read until EOF using readline() and return a list containing the lines thus read. | |
Set the file's current position. | |
Return the file's current position. | |
Write a string to the file. | |
Write a sequence of strings to the file. |
Method Details |
---|
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.
|
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.
|
Trees | Index | Help |
|
---|
Generated by Epydoc 2.1 on Fri Jun 24 12:01:21 2005 | http://epydoc.sf.net |