Staging
v0.5.1
https://github.com/python/cpython
Revision 91922677ead8c21c861e769d5d8973048a366939 authored by Guido van Rossum on 09 October 1997, 20:24:13 UTC, committed by Guido van Rossum on 09 October 1997, 20:24:13 UTC
1 parent d49266e
Raw File
Tip revision: 91922677ead8c21c861e769d5d8973048a366939 authored by Guido van Rossum on 09 October 1997, 20:24:13 UTC
Don Beaudry's changes to support SGI_ABI on Irix 6.x.
Tip revision: 9192267
libstrio.tex
\section{Standard Module \sectcode{StringIO}}
\label{module-StringIO}

\stmodindex{StringIO}

This module implements a file-like class, \code{StringIO},
that reads and writes a string buffer (also known as {\em memory
files}). See the description on file objects for operations.

When a \code{StringIO} object is created, it can be initialized
to an existing string by passing the string to the constructor.
If no string is given, the \code{StringIO} will start empty.

The method \code{getvalue()} can be called to retrieve the entire
contents of the ``file'' at any time before the \code{StringIO}
object's \code{close()} method is called.  Calling \code{close()} will
free the memory buffer.
back to top