def getvalue(self):
_complain_ifclosed(self.closed)<EOL>if self.buflist:<EOL><INDENT>self.buf += '<STR_LIT>'.join(self.buflist)<EOL>self.buflist = []<EOL><DEDENT>return self.buf<EOL>
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.