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
0a3c7532
Kaydet (Commit)
0a3c7532
authored
Haz 02, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Additional info about sys.path, sys.version, sys.prefix, sys.exec_prefix.
(AMK)
üst
0fa066b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
6 deletions
+86
-6
libsys.tex
Doc/lib/libsys.tex
+43
-3
libsys.tex
Doc/libsys.tex
+43
-3
No files found.
Doc/lib/libsys.tex
Dosyayı görüntüle @
0a3c7532
...
@@ -40,6 +40,19 @@ It is always available.
...
@@ -40,6 +40,19 @@ It is always available.
\obindex
{
traceback
}
\obindex
{
traceback
}
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
exec
_
prefix
}
A string giving the site-specific
directory prefix where the platform-dependent Python files are
installed; by default, this is also
\code
{
"/usr/local"
}
. This can be
set at build time with the
\code
{
--exec-prefix
}
argument to the
\code
{
configure
}
script. Specifically, all configuration files
(e.g. the
\code
{
config.h
}
header file) are installed in the directory
\code
{
sys.exec
_
prefix+"/lib/python
\emph
{
VER
}
/config"
}
, and shared library
modules are installed in
\code
{
sys.exec
_
prefix+"/lib/python
\emph
{
VER
}
/sharedmodules"
}
,
where
\emph
{
VER
}
is equal to
\code
{
sys.version[:3]
}
.
\end{datadesc}
\begin{funcdesc}
{
exit
}{
n
}
\begin{funcdesc}
{
exit
}{
n
}
Exit from Python with numeric exit status
\var
{
n
}
. This is
Exit from Python with numeric exit status
\var
{
n
}
. This is
implemented by raising the
\code
{
SystemExit
}
exception, so cleanup
implemented by raising the
\code
{
SystemExit
}
exception, so cleanup
...
@@ -78,12 +91,35 @@ It is always available.
...
@@ -78,12 +91,35 @@ It is always available.
\begin{datadesc}
{
path
}
\begin{datadesc}
{
path
}
A list of strings that specifies the search path for modules.
A list of strings that specifies the search path for modules.
Initialized from the environment variable
\code
{
PYTHONPATH
}
, or an
Initialized from the environment variable
\code
{
PYTHONPATH
}
, or an
installation-dependent default.
installation-dependent default.
The first item of this list,
\code
{
sys.path[0]
}
, is the
directory containing the script that was used to invoke the Python
interpreter. If the script directory is not available (e.g. if the
interpreter is invoked interactively or if the script is read from
standard input),
\code
{
sys.path[0]
}
is the empty string, which directs
Python to search modules in the current directory first. Notice that
the script directory is inserted
{
\em
before
}
the entries inserted as
a result of
\code
{
\$
PYTHONPATH
}
.
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
platform
}
\begin{datadesc}
{
platform
}
This string contains a platform identifier. This can be used to
This string contains a platform identifier, e.g.
\code
{
sunos5
}
or
append platform-specific components to
\code
{
sys.path
}
, for instance.
\code
{
linux1
}
. This can be used to append platform-specific
components to
\code
{
sys.path
}
, for instance.
\end{datadesc}
\begin{datadesc}
{
prefix
}
A string giving the site-specific directory prefix where the platform
independent Python files are installed; by default, this is the string
\code
{
"/usr/local"
}
. This can be set at build time with the
\code
{
--prefix
}
argument to the
\code
{
configure
}
script. The main
collection of Python library modules is installed in the directory
\code
{
sys.prefix+"/lib/python
\emph
{
VER
}
"
}
while the platform
independent header files (all except
\code
{
config.h
}
) are stored in
\code
{
sys.prefix+"/include/python
\emph
{
VER
}
"
}
,
where
\emph
{
VER
}
is equal to
\code
{
sys.version[:3]
}
.
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
ps1
}
\begin{datadesc}
{
ps1
}
...
@@ -150,3 +186,7 @@ unhandled exception occurs. The default is 1000. When set to 0 or
...
@@ -150,3 +186,7 @@ unhandled exception occurs. The default is 1000. When set to 0 or
less, all traceback information is suppressed and only the exception
less, all traceback information is suppressed and only the exception
type and value are printed.
type and value are printed.
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
version
}
A string containing the version number of the Python interpreter.
\end{datadesc}
Doc/libsys.tex
Dosyayı görüntüle @
0a3c7532
...
@@ -40,6 +40,19 @@ It is always available.
...
@@ -40,6 +40,19 @@ It is always available.
\obindex
{
traceback
}
\obindex
{
traceback
}
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
exec
_
prefix
}
A string giving the site-specific
directory prefix where the platform-dependent Python files are
installed; by default, this is also
\code
{
"/usr/local"
}
. This can be
set at build time with the
\code
{
--exec-prefix
}
argument to the
\code
{
configure
}
script. Specifically, all configuration files
(e.g. the
\code
{
config.h
}
header file) are installed in the directory
\code
{
sys.exec
_
prefix+"/lib/python
\emph
{
VER
}
/config"
}
, and shared library
modules are installed in
\code
{
sys.exec
_
prefix+"/lib/python
\emph
{
VER
}
/sharedmodules"
}
,
where
\emph
{
VER
}
is equal to
\code
{
sys.version[:3]
}
.
\end{datadesc}
\begin{funcdesc}
{
exit
}{
n
}
\begin{funcdesc}
{
exit
}{
n
}
Exit from Python with numeric exit status
\var
{
n
}
. This is
Exit from Python with numeric exit status
\var
{
n
}
. This is
implemented by raising the
\code
{
SystemExit
}
exception, so cleanup
implemented by raising the
\code
{
SystemExit
}
exception, so cleanup
...
@@ -78,12 +91,35 @@ It is always available.
...
@@ -78,12 +91,35 @@ It is always available.
\begin{datadesc}
{
path
}
\begin{datadesc}
{
path
}
A list of strings that specifies the search path for modules.
A list of strings that specifies the search path for modules.
Initialized from the environment variable
\code
{
PYTHONPATH
}
, or an
Initialized from the environment variable
\code
{
PYTHONPATH
}
, or an
installation-dependent default.
installation-dependent default.
The first item of this list,
\code
{
sys.path[0]
}
, is the
directory containing the script that was used to invoke the Python
interpreter. If the script directory is not available (e.g. if the
interpreter is invoked interactively or if the script is read from
standard input),
\code
{
sys.path[0]
}
is the empty string, which directs
Python to search modules in the current directory first. Notice that
the script directory is inserted
{
\em
before
}
the entries inserted as
a result of
\code
{
\$
PYTHONPATH
}
.
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
platform
}
\begin{datadesc}
{
platform
}
This string contains a platform identifier. This can be used to
This string contains a platform identifier, e.g.
\code
{
sunos5
}
or
append platform-specific components to
\code
{
sys.path
}
, for instance.
\code
{
linux1
}
. This can be used to append platform-specific
components to
\code
{
sys.path
}
, for instance.
\end{datadesc}
\begin{datadesc}
{
prefix
}
A string giving the site-specific directory prefix where the platform
independent Python files are installed; by default, this is the string
\code
{
"/usr/local"
}
. This can be set at build time with the
\code
{
--prefix
}
argument to the
\code
{
configure
}
script. The main
collection of Python library modules is installed in the directory
\code
{
sys.prefix+"/lib/python
\emph
{
VER
}
"
}
while the platform
independent header files (all except
\code
{
config.h
}
) are stored in
\code
{
sys.prefix+"/include/python
\emph
{
VER
}
"
}
,
where
\emph
{
VER
}
is equal to
\code
{
sys.version[:3]
}
.
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
ps1
}
\begin{datadesc}
{
ps1
}
...
@@ -150,3 +186,7 @@ unhandled exception occurs. The default is 1000. When set to 0 or
...
@@ -150,3 +186,7 @@ unhandled exception occurs. The default is 1000. When set to 0 or
less, all traceback information is suppressed and only the exception
less, all traceback information is suppressed and only the exception
type and value are printed.
type and value are printed.
\end{datadesc}
\end{datadesc}
\begin{datadesc}
{
version
}
A string containing the version number of the Python interpreter.
\end{datadesc}
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