Changeset 391 for python/trunk/Doc/library/tempfile.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/tempfile.rst
r2 r391 1 2 1 :mod:`tempfile` --- Generate temporary files and directories 3 2 ============================================================ … … 13 12 pair: temporary; file name 14 13 pair: temporary; file 14 15 **Source code:** :source:`Lib/tempfile.py` 16 17 -------------- 15 18 16 19 This module generates temporary files and directories. It works on all … … 62 65 the file is guaranteed to have a visible name in the file system (on 63 66 Unix, the directory entry is not unlinked). That name can be retrieved 64 from the :attr:`name` memberof the file object. Whether the name can be67 from the :attr:`name` attribute of the file object. Whether the name can be 65 68 used to open the file a second time, while the named temporary file is 66 69 still open, varies across platforms (it can be so used on Unix; it cannot … … 84 87 until the file's :func:`fileno` method is called, at which point the 85 88 contents are written to disk and operation proceeds as with 86 :func:`TemporaryFile`. 89 :func:`TemporaryFile`. Also, it's ``truncate`` method does not 90 accept a ``size`` argument. 87 91 88 92 The resulting file has one additional method, :func:`rollover`, which … … 90 94 91 95 The returned object is a file-like object whose :attr:`_file` attribute 92 is either a :class:` StringIO` object or a true file object, depending on96 is either a :class:`~StringIO.StringIO` object or a true file object, depending on 93 97 whether :func:`rollover` has been called. This file-like object can be 94 98 used in a :keyword:`with` statement, just like a normal file.
Note:
See TracChangeset
for help on using the changeset viewer.