diff options
author | Fred Drake <fdrake@acm.org> | 2000-05-26 19:32:14 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2000-05-26 19:32:14 (GMT) |
commit | b80a77785943617f091bc85bc387cdc633be17e2 (patch) | |
tree | 80785e9dba0022d7cc1b34545600287daace218c /Doc/lib/libtempfile.tex | |
parent | 262e83cb1ae1b1436a653c4dd5a519adce656af3 (diff) | |
download | cpython-b80a77785943617f091bc85bc387cdc633be17e2.zip cpython-b80a77785943617f091bc85bc387cdc633be17e2.tar.gz cpython-b80a77785943617f091bc85bc387cdc633be17e2.tar.bz2 |
Added documentation for gettempprefix().
Deprecated direct access to template.
Added note about past need to modify template so that legacy code has a
better chance of being understood, noting that the requirement to reset
template after os.fork() disappeared in 1.5.2.
Diffstat (limited to 'Doc/lib/libtempfile.tex')
-rw-r--r-- | Doc/lib/libtempfile.tex | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Doc/lib/libtempfile.tex b/Doc/lib/libtempfile.tex index d3921bd..d1bc011 100644 --- a/Doc/lib/libtempfile.tex +++ b/Doc/lib/libtempfile.tex @@ -55,11 +55,24 @@ current working directory (all other systems). No check is made to see whether its value is valid. \end{datadesc} +\begin{funcdesc}{gettempprefix}{} +Return the filename prefix used to create temporary files. This does +not contain the directory component. Using this function is preferred +over using the \code{template} variable directly. +\versionadded{1.5.2} +\end{funcdesc} + \begin{datadesc}{template} +\deprecated{1.6}{Use \function{gettempprefix()} instead.} When set to a value other than \code{None}, this variable defines the prefix of the final component of the filenames returned by \function{mktemp()}. A string of decimal digits is added to generate unique filenames. The default is either \file{@\var{pid}.} where -\var{pid} is the current process ID (on \UNIX{}), or \file{tmp} (all -other systems). +\var{pid} is the current process ID (on \UNIX{}), +\file{\textasciitilde\var{pid}-} on Windows NT, \file{Python-Tmp-} on +MacOS, or \file{tmp} (all other systems). + +Older versions of this module used to require that \code{template} be +set to \code{None} after a call to \function{os.fork()}; this has not +been necessary since version 1.5.2. \end{datadesc} |