Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
614438ab
Kaydet (Commit)
614438ab
authored
Eyl 11, 2003
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fix markup buglets
üst
f5c87c4d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
22 deletions
+13
-22
libtempfile.tex
Doc/lib/libtempfile.tex
+13
-22
No files found.
Doc/lib/libtempfile.tex
Dosyayı görüntüle @
614438ab
...
@@ -28,11 +28,9 @@ arguments for clarity.
...
@@ -28,11 +28,9 @@ arguments for clarity.
The module defines the following user-callable functions:
The module defines the following user-callable functions:
\begin{funcdesc}
{
TemporaryFile
}{
\optional
{
mode='w+b'
}
\begin{funcdesc}
{
TemporaryFile
}{
\optional
{
mode=
\code
{
'w+b'
}
\optional
{
,
\optional
{
, bufsize=-1
}
bufsize=
\code
{
-1
}
\optional
{
,
\optional
{
, suffix
}
suffix
\optional
{
, prefix
\optional
{
, dir
}}}}}}
\optional
{
, prefix
}
\optional
{
, dir
}}
Return a file (or file-like) object that can be used as a temporary
Return a file (or file-like) object that can be used as a temporary
storage area. The file is created using
\function
{
mkstemp
}
. It will
storage area. The file is created using
\function
{
mkstemp
}
. It will
be destroyed as soon as it is closed (including an implicit close when
be destroyed as soon as it is closed (including an implicit close when
...
@@ -52,11 +50,10 @@ The \var{dir}, \var{prefix} and \var{suffix} parameters are passed to
...
@@ -52,11 +50,10 @@ The \var{dir}, \var{prefix} and \var{suffix} parameters are passed to
\function
{
mkstemp()
}
.
\function
{
mkstemp()
}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
NamedTemporaryFile
}{
\optional
{
mode='w+b'
}
\begin{funcdesc}
{
NamedTemporaryFile
}{
\optional
{
mode=
\code
{
'w+b'
}
\optional
{
,
\optional
{
, bufsize=-1
}
bufsize=
\code
{
-1
}
\optional
{
,
\optional
{
, suffix
}
suffix
\optional
{
, prefix
\optional
{
,
\optional
{
, prefix
}
dir
}}}}}}
\optional
{
, dir
}}
This function operates exactly as
\function
{
TemporaryFile()
}
does,
This function operates exactly as
\function
{
TemporaryFile()
}
does,
except that the file is guaranteed to have a visible name in the file
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
system (on
\UNIX
, the directory entry is not unlinked). That name can
...
@@ -67,10 +64,8 @@ be so used on \UNIX; it cannot on Windows NT or later).
...
@@ -67,10 +64,8 @@ be so used on \UNIX; it cannot on Windows NT or later).
\versionadded
{
2.3
}
\versionadded
{
2.3
}
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
mkstemp
}{
\optional
{
suffix
}
\begin{funcdesc}
{
mkstemp
}{
\optional
{
suffix
\optional
{
,
\optional
{
, prefix
}
prefix
\optional
{
, dir
\optional
{
, text
}}}}}
\optional
{
, dir
}
\optional
{
, text=False
}}
Creates a temporary file in the most secure manner possible. There
Creates a temporary file in the most secure manner possible. There
are no race conditions in the file's creation, assuming that the
are no race conditions in the file's creation, assuming that the
platform properly implements the
\constant
{
O
_
EXCL
}
flag for
platform properly implements the
\constant
{
O
_
EXCL
}
flag for
...
@@ -103,9 +98,7 @@ absolute pathname of that file, in that order.
...
@@ -103,9 +98,7 @@ absolute pathname of that file, in that order.
\versionadded
{
2.3
}
\versionadded
{
2.3
}
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
mkdtemp
}{
\optional
{
suffix
}
\begin{funcdesc}
{
mkdtemp
}{
\optional
{
suffix
\optional
{
, prefix
\optional
{
, dir
}}}}
\optional
{
, prefix
}
\optional
{
, dir
}}
Creates a temporary directory in the most secure manner possible.
Creates a temporary directory in the most secure manner possible.
There are no race conditions in the directory's creation. The
There are no race conditions in the directory's creation. The
directory is readable, writable, and searchable only by the
directory is readable, writable, and searchable only by the
...
@@ -121,9 +114,7 @@ as for \function{mkstemp()}.
...
@@ -121,9 +114,7 @@ as for \function{mkstemp()}.
\versionadded
{
2.3
}
\versionadded
{
2.3
}
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
mktemp
}{
\optional
{
suffix
}
\begin{funcdesc}
{
mktemp
}{
\optional
{
suffix
\optional
{
, prefix
\optional
{
, dir
}}}}
\optional
{
, prefix
}
\optional
{
, dir
}}
\deprecated
{
2.3
}{
Use
\function
{
mkstemp()
}
instead.
}
\deprecated
{
2.3
}{
Use
\function
{
mkstemp()
}
instead.
}
Return an absolute pathname of a file that did not exist at the time
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
}
the call is made. The
\var
{
prefix
}
,
\var
{
suffix
}
, and
\var
{
dir
}
...
@@ -144,7 +135,7 @@ When set to a value other than \code{None}, this variable defines the
...
@@ -144,7 +135,7 @@ When set to a value other than \code{None}, this variable defines the
default value for the
\var
{
dir
}
argument to all the functions defined
default value for the
\var
{
dir
}
argument to all the functions defined
in this module.
in this module.
If
\
var
{
tempdir
}
is unset or
\code
{
None
}
at any call to any of the
If
\
code
{
tempdir
}
is unset or
\code
{
None
}
at any call to any of the
above functions, Python searches a standard list of directories and
above functions, Python searches a standard list of directories and
sets
\var
{
tempdir
}
to the first one which the calling user can create
sets
\var
{
tempdir
}
to the first one which the calling user can create
files in. The list is:
files in. The list is:
...
@@ -172,7 +163,7 @@ files in. The list is:
...
@@ -172,7 +163,7 @@ files in. The list is:
\begin{funcdesc}
{
gettempdir
}{}
\begin{funcdesc}
{
gettempdir
}{}
Return the directory currently selected to create temporary files in.
Return the directory currently selected to create temporary files in.
If
\
var
{
tempdir
}
is not None
, this simply returns its contents;
If
\
code
{
tempdir
}
is not
\code
{
None
}
, this simply returns its contents;
otherwise, the search described above is performed, and the result
otherwise, the search described above is performed, and the result
returned.
returned.
\end{funcdesc}
\end{funcdesc}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment