[Python-checkins] python/dist/src/Doc/lib libtempfile.tex,1.20,1.21
fdrake@users.sourceforge.net
fdrake@users.sourceforge.net
Tue, 22 Apr 2003 11:54:57 -0700
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv14014
Modified Files:
libtempfile.tex
Log Message:
markup corrections
Index: libtempfile.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libtempfile.tex,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** libtempfile.tex 21 Nov 2002 16:32:11 -0000 1.20
--- libtempfile.tex 22 Apr 2003 18:54:53 -0000 1.21
***************
*** 14,20 ****
In version 2.3 of Python, this module was overhauled for enhanced
security. It now provides three new functions,
! \function{NamedTemporaryFile}, \function{mkstemp}, and
! \function{mkdtemp}, which should eliminate all remaining need to use
! the insecure \function{mktemp} function. Temporary file names created
by this module no longer contain the process ID; instead a string of
six random characters is used.
--- 14,20 ----
In version 2.3 of Python, this module was overhauled for enhanced
security. It now provides three new functions,
! \function{NamedTemporaryFile()}, \function{mkstemp()}, and
! \function{mkdtemp()}, which should eliminate all remaining need to use
! the insecure \function{mktemp()} function. Temporary file names created
by this module no longer contain the process ID; instead a string of
six random characters is used.
***************
*** 40,45 ****
for the file is removed immediately after the file is created. Other
platforms do not support this; your code should not rely on a
! \class{TemporaryFile} having or not having a visible name in the file
! system.
The \var{mode} parameter defaults to \code{'w+b'} so that the file
--- 40,45 ----
for the file is removed immediately after the file is created. Other
platforms do not support this; your code should not rely on a
! temporary file created using this function having or not having a
! visible name in the file system.
The \var{mode} parameter defaults to \code{'w+b'} so that the file
***************
*** 50,54 ****
The \var{dir}, \var{prefix} and \var{suffix} parameters are passed to
! \function{mkstemp}.
\end{funcdesc}
--- 50,54 ----
The \var{dir}, \var{prefix} and \var{suffix} parameters are passed to
! \function{mkstemp()}.
\end{funcdesc}
***************
*** 58,62 ****
\optional{, prefix}
\optional{, dir}}
! This function operates exactly as \function{TemporaryFile} does,
except that the file is guaranteed to have a visible name in the file
system (on \UNIX, the directory entry is not unlinked). That name can
--- 58,62 ----
\optional{, prefix}
\optional{, dir}}
! This function operates exactly as \function{TemporaryFile()} does,
except that the file is guaranteed to have a visible name in the file
system (on \UNIX, the directory entry is not unlinked). That name can
***************
*** 75,88 ****
are no race conditions in the file's creation, assuming that the
platform properly implements the \constant{O_EXCL} flag for
! \function{os.open}. The file is readable and writable only by the
creating user ID. If the platform uses permission bits to indicate
whether a file is executable, the file is executable by no one. The
file descriptor is not inherited by child processes.
! Unlike \function{TemporaryFile}, the user of \function{mkstemp} is
responsible for deleting the temporary file when done with it.
If \var{suffix} is specified, the file name will end with that suffix,
! otherwise there will be no suffix. \function{mkstemp} does not put a
dot between the file name and the suffix; if you need one, put it at
the beginning of \var{suffix}.
--- 75,88 ----
are no race conditions in the file's creation, assuming that the
platform properly implements the \constant{O_EXCL} flag for
! \function{os.open()}. The file is readable and writable only by the
creating user ID. If the platform uses permission bits to indicate
whether a file is executable, the file is executable by no one. The
file descriptor is not inherited by child processes.
! Unlike \function{TemporaryFile()}, the user of \function{mkstemp()} is
responsible for deleting the temporary file when done with it.
If \var{suffix} is specified, the file name will end with that suffix,
! otherwise there will be no suffix. \function{mkstemp()} does not put a
dot between the file name and the suffix; if you need one, put it at
the beginning of \var{suffix}.
***************
*** 98,103 ****
no difference.
! \function{mkstemp} returns a tuple containing an OS-level handle to
! an open file (as would be returned by \function{os.open}) and the
absolute pathname of that file, in that order.
\versionadded{2.3}
--- 98,103 ----
no difference.
! \function{mkstemp()} returns a tuple containing an OS-level handle to
! an open file (as would be returned by \function{os.open()}) and the
absolute pathname of that file, in that order.
\versionadded{2.3}
***************
*** 112,122 ****
creating user ID.
! The user of \function{mkdtemp} is responsible for deleting the
temporary directory and its contents when done with it.
The \var{prefix}, \var{suffix}, and \var{dir} arguments are the same
! as for \function{mkstemp}.
! \function{mkdtemp} returns the absolute pathname of the new directory.
\versionadded{2.3}
\end{funcdesc}
--- 112,122 ----
creating user ID.
! The user of \function{mkdtemp()} is responsible for deleting the
temporary directory and its contents when done with it.
The \var{prefix}, \var{suffix}, and \var{dir} arguments are the same
! as for \function{mkstemp()}.
! \function{mkdtemp()} returns the absolute pathname of the new directory.
\versionadded{2.3}
\end{funcdesc}
***************
*** 128,132 ****
Return an absolute pathname of a file that did not exist at the time
the call is made. The \var{prefix}, \var{suffix}, and \var{dir}
! arguments are the same as for \function{mkstemp}.
\warning{Use of this function may introduce a security hole in your
--- 128,132 ----
Return an absolute pathname of a file that did not exist at the time
the call is made. The \var{prefix}, \var{suffix}, and \var{dir}
! arguments are the same as for \function{mkstemp()}.
\warning{Use of this function may introduce a security hole in your