Guido van Rossum | cda3d7d | 1997-03-03 16:01:21 +0000 | [diff] [blame^] | 1 | \section{Standard Module \sectcode{StringIO}} |
| 2 | |
| 3 | \stmodindex{StringIO} |
| 4 | |
| 5 | This module implements a file-like class, \code{StringIO}, |
| 6 | that read and write a string buffer (also known as {\em memory |
| 7 | files}). See the description on file objects for operations. |
| 8 | |
| 9 | When a \code{StringIO} object is created, it can be initialized |
| 10 | to an existing string by passing the string to the constructor. |
| 11 | If no string is given, the \code{StringIO} will start empty. |
| 12 | |
| 13 | The method \code{getvalue()} can be called at any time to return the |
| 14 | contents of the entire ``file'' at any time. |