[Python-checkins] CVS: python/dist/src/Doc/lib libtempfile.tex,1.13,1.14
Fred L. Drake
python-dev@python.org
2000年5月26日 12:32:17 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory slayer.i.sourceforge.net:/tmp/cvs-serv25679
Modified Files:
libtempfile.tex
Log Message:
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.
Index: libtempfile.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtempfile.tex,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -r1.13 -r1.14
*** libtempfile.tex 2000年05月26日 19:05:16 1.13
--- libtempfile.tex 2000年05月26日 19:32:14 1.14
***************
*** 56,65 ****
\end{datadesc}
\begin{datadesc}{template}
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).
\end{datadesc}
--- 56,78 ----
\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{}),
! \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}