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
62b297b6
Kaydet (Commit)
62b297b6
authored
Eyl 08, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Change packages -> site-packages
üst
d6ead328
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
site.py
Lib/site.py
+10
-8
No files found.
Lib/site.py
Dosyayı görüntüle @
62b297b6
...
@@ -12,8 +12,9 @@ works).
...
@@ -12,8 +12,9 @@ works).
This will append site-specific paths to to the module search path. It
This will append site-specific paths to to the module search path. It
starts with sys.prefix and sys.exec_prefix (if different) and appends
starts with sys.prefix and sys.exec_prefix (if different) and appends
lib/python<version>/packages. The resulting directory, if it exists,
lib/python<version>/site-packages as well as lib/site-python. The
is added to sys.path, and also inspected for path configuration files.
resulting directories, if they exist, are appended to sys.path, and
also inspected for path configuration files.
A path configuration file is a file whose name has the form
A path configuration file is a file whose name has the form
<package>.pth; its contents are additional directories (one per line)
<package>.pth; its contents are additional directories (one per line)
...
@@ -23,9 +24,10 @@ sys.path more than once. Blank lines and lines beginning with
...
@@ -23,9 +24,10 @@ sys.path more than once. Blank lines and lines beginning with
\
code{#} are skipped.
\
code{#} are skipped.
For example, suppose sys.prefix and sys.exec_prefix are set to
For example, suppose sys.prefix and sys.exec_prefix are set to
/usr/local and there is a directory /usr/local/python1.5/packages with
/usr/local and there is a directory /usr/local/python1.5/site-packages
three subdirectories, foo, bar and spam, and two path configuration
with three subdirectories, foo, bar and spam, and two path
files, foo.pth and bar.pth. Assume foo.pth contains the following:
configuration files, foo.pth and bar.pth. Assume foo.pth contains the
following:
# foo package configuration
# foo package configuration
foo
foo
...
@@ -39,8 +41,8 @@ and bar.pth contains:
...
@@ -39,8 +41,8 @@ and bar.pth contains:
Then the following directories are added to sys.path, in this order:
Then the following directories are added to sys.path, in this order:
/usr/local/lib/python1.5/packages/bar
/usr/local/lib/python1.5/
site-
packages/bar
/usr/local/lib/python1.5/packages/foo
/usr/local/lib/python1.5/
site-
packages/foo
Note that bletch is omitted because it doesn't exist; bar precedes foo
Note that bletch is omitted because it doesn't exist; bar precedes foo
because bar.pth comes alphabetically before foo.pth; and spam is
because bar.pth comes alphabetically before foo.pth; and spam is
...
@@ -99,7 +101,7 @@ for prefix in prefixes:
...
@@ -99,7 +101,7 @@ for prefix in prefixes:
sitedirs
=
[
os
.
path
.
join
(
prefix
,
sitedirs
=
[
os
.
path
.
join
(
prefix
,
"lib"
,
"lib"
,
"python"
+
sys
.
version
[:
3
],
"python"
+
sys
.
version
[:
3
],
"packages"
),
"
site-
packages"
),
os
.
path
.
join
(
prefix
,
"lib"
,
"site-python"
)]
os
.
path
.
join
(
prefix
,
"lib"
,
"site-python"
)]
else
:
else
:
sitedirs
=
[
prefix
]
sitedirs
=
[
prefix
]
...
...
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