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
81b3060b
Kaydet (Commit)
81b3060b
authored
Mar 01, 1995
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
en weer twee!
üst
51bbdfb2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
208 additions
and
0 deletions
+208
-0
libtempfile.tex
Doc/lib/libtempfile.tex
+50
-0
libtraceback.tex
Doc/lib/libtraceback.tex
+54
-0
libtempfile.tex
Doc/libtempfile.tex
+50
-0
libtraceback.tex
Doc/libtraceback.tex
+54
-0
No files found.
Doc/lib/libtempfile.tex
0 → 100644
Dosyayı görüntüle @
81b3060b
\section
{
Built-in module
\sectcode
{
tempfile
}}
\stmodindex
{
tempfile
}
\indexii
{
temporary
}{
file name
}
\indexii
{
temporary
}{
file
}
\renewcommand
{
\indexsubitem
}{
(in module tempfile)
}
This module generates temporary file names. It is not UNIX specific,
but it may require some help on non-UNIX systems.
Note: the modules does not create temporary files, nor does it
automatically remove them when the current process exits or dies.
The module defines a single user-callable function:
\begin{funcdesc}
{
mktemp
}{}
Return a unique temporary filename. This is an absolute pathname of a
file that does not exist at the time the call is made. No two calls
will return the same filename.
\end{funcdesc}
The module uses two global variables that tell it how to construct a
temporary name. The caller may assign values to them; by default they
are initialized at the first call to
\code
{
mktemp()
}
.
\begin{datadesc}
{
tempdir
}
When set to a value other than
\code
{
None
}
, this variable defines the
directory in which filenames returned by
\code
{
mktemp()
}
reside. The
default is taken from the environment variable
\code
{
TMPDIR
}
; if this
is not set, either
\code
{
/usr/tmp
}
is used (on UNIX), or the current
working directory (all other systems). No check is made to see
whether its value is valid.
\end{datadesc}
\ttindex
{
TMPDIR
}
\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
\code
{
mktemp()
}
. A string of decimal digits is added to generate
unique filenames. The default is either ``
\code
{
@
\var
{
pid
}
.
}
'' where
\var
{
pid
}
is the current process ID (on UNIX), or ``
\code
{
tmp
}
'' (all
other systems).
\end{datadesc}
Warning: if a UNIX process uses
\code
{
mktemp()
}
, then calls
\code
{
fork()
}
and both parent and child continue to use
\code
{
mktemp()
}
, the processes will generate conflicting temporary
names. To resolve this, the child process should assign
\code
{
None
}
to
\code
{
template
}
, to force recomputing the default on the next call
to
\code
{
mktemp()
}
.
Doc/lib/libtraceback.tex
0 → 100644
Dosyayı görüntüle @
81b3060b
\section
{
Built-in module
\sectcode
{
traceback
}}
\stmodindex
{
traceback
}
\renewcommand
{
\indexsubitem
}{
(in module traceback)
}
This module provides a standard interface to format and print stack
traces of Python programs. It exactly mimics the behavior of the
Python interpreter when it prints a stack trace. This is useful when
you want to print stack traces under program control, e.g. in a
``wrapper'' around the interpreter.
The module uses traceback objects --- this is the object type
that is stored in the variables
\code
{
sys.exc
_
traceback
}
and
\code
{
sys.last
_
traceback
}
.
The module defines the following functions:
\begin{funcdesc}
{
print
_
tb
}{
traceback
\optional
{
\,
limit
}}
Print up to
\var
{
limit
}
stack trace entries from
\var
{
traceback
}
. If
\var
{
limit
}
is omitted or
\code
{
None
}
, all entries are printed.
\end{funcdesc}
\begin{funcdesc}
{
extract
_
tb
}{
traceback
\optional
{
\,
limit
}}
Return a list of up to
\var
{
limit
}
``pre-processed'' stack trace
entries extracted from
\var
{
traceback
}
. It is useful for alternate
formatting of stack traces. If
\var
{
limit
}
is omitted or
\code
{
None
}
,
all entries are extracted. A ``pre-processed'' stack trace entry is a
quadruple (
\var
{
filename
}
,
\var
{
line number
}
,
\var
{
function name
}
,
\var
{
line text
}
) representing the information that is usually printed
for a stack trace. The
\var
{
line text
}
is a string with leading and
trailing whitespace stripped; if the source is not available it is
\code
{
None
}
.
\end{funcdesc}
\begin{funcdesc}
{
print
_
exception
}{
type
\,
value
\,
traceback
\optional
{
\,
limit
}}
Print exception information and up to
\var
{
limit
}
stack trace entries
from
\var
{
traceback
}
. This differs from
\code
{
print
_
tb
}
in the
following ways: (1) if
\var
{
traceback
}
is not
\code
{
None
}
, it prints a
header ``
\code
{
Traceback (innermost last):
}
''; (2) it prints the
exception
\var
{
type
}
and
\var
{
value
}
after the stack trace; (3) if
\var
{
type
}
is
\code
{
SyntaxError
}
and
\var
{
value
}
has the appropriate
format, it prints the line where the syntax error occurred with a
caret indication the approximate position of the error.
\end{funcdesc}
\begin{funcdesc}
{
print
_
exc
}{
\optional
{
limit
}}
This is a shorthand for
\code
{
print
_
exception(sys.exc
_
type,
}
\code
{
sys.exc
_
value,
}
\code
{
sys.exc
_
traceback,
}
\code
{
limit)
}
.
\end{funcdesc}
\begin{funcdesc}
{
print
_
last
}{
\optional
{
limit
}}
This is a shorthand for
\code
{
print
_
exception(sys.last
_
type,
}
\code
{
sys.last
_
value,
}
\code
{
sys.last
_
traceback,
}
\code
{
limit)
}
.
\end{funcdesc}
Doc/libtempfile.tex
0 → 100644
Dosyayı görüntüle @
81b3060b
\section
{
Built-in module
\sectcode
{
tempfile
}}
\stmodindex
{
tempfile
}
\indexii
{
temporary
}{
file name
}
\indexii
{
temporary
}{
file
}
\renewcommand
{
\indexsubitem
}{
(in module tempfile)
}
This module generates temporary file names. It is not UNIX specific,
but it may require some help on non-UNIX systems.
Note: the modules does not create temporary files, nor does it
automatically remove them when the current process exits or dies.
The module defines a single user-callable function:
\begin{funcdesc}
{
mktemp
}{}
Return a unique temporary filename. This is an absolute pathname of a
file that does not exist at the time the call is made. No two calls
will return the same filename.
\end{funcdesc}
The module uses two global variables that tell it how to construct a
temporary name. The caller may assign values to them; by default they
are initialized at the first call to
\code
{
mktemp()
}
.
\begin{datadesc}
{
tempdir
}
When set to a value other than
\code
{
None
}
, this variable defines the
directory in which filenames returned by
\code
{
mktemp()
}
reside. The
default is taken from the environment variable
\code
{
TMPDIR
}
; if this
is not set, either
\code
{
/usr/tmp
}
is used (on UNIX), or the current
working directory (all other systems). No check is made to see
whether its value is valid.
\end{datadesc}
\ttindex
{
TMPDIR
}
\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
\code
{
mktemp()
}
. A string of decimal digits is added to generate
unique filenames. The default is either ``
\code
{
@
\var
{
pid
}
.
}
'' where
\var
{
pid
}
is the current process ID (on UNIX), or ``
\code
{
tmp
}
'' (all
other systems).
\end{datadesc}
Warning: if a UNIX process uses
\code
{
mktemp()
}
, then calls
\code
{
fork()
}
and both parent and child continue to use
\code
{
mktemp()
}
, the processes will generate conflicting temporary
names. To resolve this, the child process should assign
\code
{
None
}
to
\code
{
template
}
, to force recomputing the default on the next call
to
\code
{
mktemp()
}
.
Doc/libtraceback.tex
0 → 100644
Dosyayı görüntüle @
81b3060b
\section
{
Built-in module
\sectcode
{
traceback
}}
\stmodindex
{
traceback
}
\renewcommand
{
\indexsubitem
}{
(in module traceback)
}
This module provides a standard interface to format and print stack
traces of Python programs. It exactly mimics the behavior of the
Python interpreter when it prints a stack trace. This is useful when
you want to print stack traces under program control, e.g. in a
``wrapper'' around the interpreter.
The module uses traceback objects --- this is the object type
that is stored in the variables
\code
{
sys.exc
_
traceback
}
and
\code
{
sys.last
_
traceback
}
.
The module defines the following functions:
\begin{funcdesc}
{
print
_
tb
}{
traceback
\optional
{
\,
limit
}}
Print up to
\var
{
limit
}
stack trace entries from
\var
{
traceback
}
. If
\var
{
limit
}
is omitted or
\code
{
None
}
, all entries are printed.
\end{funcdesc}
\begin{funcdesc}
{
extract
_
tb
}{
traceback
\optional
{
\,
limit
}}
Return a list of up to
\var
{
limit
}
``pre-processed'' stack trace
entries extracted from
\var
{
traceback
}
. It is useful for alternate
formatting of stack traces. If
\var
{
limit
}
is omitted or
\code
{
None
}
,
all entries are extracted. A ``pre-processed'' stack trace entry is a
quadruple (
\var
{
filename
}
,
\var
{
line number
}
,
\var
{
function name
}
,
\var
{
line text
}
) representing the information that is usually printed
for a stack trace. The
\var
{
line text
}
is a string with leading and
trailing whitespace stripped; if the source is not available it is
\code
{
None
}
.
\end{funcdesc}
\begin{funcdesc}
{
print
_
exception
}{
type
\,
value
\,
traceback
\optional
{
\,
limit
}}
Print exception information and up to
\var
{
limit
}
stack trace entries
from
\var
{
traceback
}
. This differs from
\code
{
print
_
tb
}
in the
following ways: (1) if
\var
{
traceback
}
is not
\code
{
None
}
, it prints a
header ``
\code
{
Traceback (innermost last):
}
''; (2) it prints the
exception
\var
{
type
}
and
\var
{
value
}
after the stack trace; (3) if
\var
{
type
}
is
\code
{
SyntaxError
}
and
\var
{
value
}
has the appropriate
format, it prints the line where the syntax error occurred with a
caret indication the approximate position of the error.
\end{funcdesc}
\begin{funcdesc}
{
print
_
exc
}{
\optional
{
limit
}}
This is a shorthand for
\code
{
print
_
exception(sys.exc
_
type,
}
\code
{
sys.exc
_
value,
}
\code
{
sys.exc
_
traceback,
}
\code
{
limit)
}
.
\end{funcdesc}
\begin{funcdesc}
{
print
_
last
}{
\optional
{
limit
}}
This is a shorthand for
\code
{
print
_
exception(sys.last
_
type,
}
\code
{
sys.last
_
value,
}
\code
{
sys.last
_
traceback,
}
\code
{
limit)
}
.
\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