Mercurial > cpython-lru_cache-weakref
annotate Doc/libstrio.tex @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 6a0d7cf19d38 |
| children | 5bb884527446 |
| rev | line source |
|---|---|
|
5159
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
1 \section{Standard Module \sectcode{StringIO}} |
|
5816
6a0d7cf19d38
Note that getvalue() must be called before close().
Guido van Rossum <guido@python.org>
parents:
5252
diff
changeset
|
2 \label{module-StringIO} |
|
5159
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
3 |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
4 \stmodindex{StringIO} |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
5 |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
6 This module implements a file-like class, \code{StringIO}, |
| 5252 | 7 that reads and writes a string buffer (also known as {\em memory |
|
5159
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
8 files}). See the description on file objects for operations. |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
9 |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
10 When a \code{StringIO} object is created, it can be initialized |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
11 to an existing string by passing the string to the constructor. |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
12 If no string is given, the \code{StringIO} will start empty. |
|
ef8351ea72c1
Added (minimal) StringIO docs.
Guido van Rossum <guido@python.org>
parents:
diff
changeset
|
13 |
|
5816
6a0d7cf19d38
Note that getvalue() must be called before close().
Guido van Rossum <guido@python.org>
parents:
5252
diff
changeset
|
14 The method \code{getvalue()} can be called to retrieve the entire |
|
6a0d7cf19d38
Note that getvalue() must be called before close().
Guido van Rossum <guido@python.org>
parents:
5252
diff
changeset
|
15 contents of the ``file'' at any time before the \code{StringIO} |
|
6a0d7cf19d38
Note that getvalue() must be called before close().
Guido van Rossum <guido@python.org>
parents:
5252
diff
changeset
|
16 object's \code{close()} method is called. Calling \code{close()} will |
|
6a0d7cf19d38
Note that getvalue() must be called before close().
Guido van Rossum <guido@python.org>
parents:
5252
diff
changeset
|
17 free the memory buffer. |
