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
269b83bc
Kaydet (Commit)
269b83bc
authored
Şub 06, 2001
tarafından
Skip Montanaro
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
added several more __all__ lists
üst
46fa39ab
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
1 deletion
+79
-1
multifile.py
Lib/multifile.py
+2
-0
mutex.py
Lib/mutex.py
+2
-0
netrc.py
Lib/netrc.py
+2
-0
nntplib.py
Lib/nntplib.py
+4
-1
ntpath.py
Lib/ntpath.py
+4
-0
nturl2path.py
Lib/nturl2path.py
+2
-0
os.py
Lib/os.py
+56
-0
test___all__.py
Lib/test/test___all__.py
+7
-0
No files found.
Lib/multifile.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -30,6 +30,8 @@ seekable stream object.
import
sys
import
string
__all__
=
[
"MultiFile"
,
"Error"
]
class
Error
(
Exception
):
pass
...
...
Lib/mutex.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -12,6 +12,8 @@ Of course, no multi-threading is implied -- hence the funny interface
for lock, where a function is called once the lock is aquired.
"""
__all__
=
[
"mutex"
]
class
mutex
:
def
__init__
(
self
):
"""Create a new mutex -- initially unlocked."""
...
...
Lib/netrc.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -4,6 +4,8 @@
import
os
,
shlex
__all__
=
[
"netrc"
]
class
netrc
:
def
__init__
(
self
,
file
=
None
):
if
not
file
:
...
...
Lib/nntplib.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -33,7 +33,10 @@ import re
import
socket
import
string
__all__
=
[
"NNTP"
,
"NNTPReplyError"
,
"NNTPTemporaryError"
,
"NNTPPermanentError"
,
"NNTPProtocolError"
,
"NNTPDataError"
,
"error_reply"
,
"error_temp"
,
"error_perm"
,
"error_proto"
,
"error_data"
,]
# Exceptions raised when an error or invalid response is received
class
NNTPError
(
Exception
):
...
...
Lib/ntpath.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -8,6 +8,10 @@ module as os.path.
import
os
import
stat
__all__
=
[
"normcase"
,
"isabs"
,
"join"
,
"splitdrive"
,
"split"
,
"splitext"
,
"basename"
,
"dirname"
,
"commonprefix"
,
"getsize"
,
"getmtime"
,
"getatime"
,
"islink"
,
"exists"
,
"isdir"
,
"isfile"
,
"ismount"
,
"walk"
,
"expanduser"
,
"expandvars"
,
"normpath"
,
"abspath"
,
"splitunc"
]
# Normalize the case of a pathname and map slashes to backslashes.
# Other normalizations (such as optimizing '../' away) are not done
...
...
Lib/nturl2path.py
Dosyayı görüntüle @
269b83bc
"""Convert a NT pathname to a file URL and vice versa."""
__all__
=
[
"url2pathname"
]
def
url2pathname
(
url
):
r"""Convert a URL to a DOS path.
...
...
Lib/os.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -19,12 +19,22 @@ and opendir), and leave all pathname manipulation to os.path
(e.g., split and join).
"""
#'
import
sys
_names
=
sys
.
builtin_module_names
altsep
=
None
__all__
=
[]
def
_get_exports_list
(
module
):
try
:
return
list
(
module
.
__all__
)
except
AttributeError
:
return
[
n
for
n
in
dir
(
module
)
if
n
[
0
]
!=
'_'
]
if
'posix'
in
_names
:
name
=
'posix'
linesep
=
'
\n
'
...
...
@@ -38,6 +48,11 @@ if 'posix' in _names:
import
posixpath
path
=
posixpath
del
posixpath
import
posix
__all__
.
extend
(
_get_exports_list
(
posix
))
del
posix
elif
'nt'
in
_names
:
name
=
'nt'
linesep
=
'
\r\n
'
...
...
@@ -52,6 +67,11 @@ elif 'nt' in _names:
import
ntpath
path
=
ntpath
del
ntpath
import
nt
__all__
.
extend
(
_get_exports_list
(
nt
))
del
nt
elif
'dos'
in
_names
:
name
=
'dos'
linesep
=
'
\r\n
'
...
...
@@ -65,6 +85,11 @@ elif 'dos' in _names:
import
dospath
path
=
dospath
del
dospath
import
dos
__all__
.
extend
(
_get_exports_list
(
dos
))
del
dos
elif
'os2'
in
_names
:
name
=
'os2'
linesep
=
'
\r\n
'
...
...
@@ -78,6 +103,11 @@ elif 'os2' in _names:
import
ntpath
path
=
ntpath
del
ntpath
import
os2
__all__
.
extend
(
_get_exports_list
(
os2
))
del
os2
elif
'mac'
in
_names
:
name
=
'mac'
linesep
=
'
\r
'
...
...
@@ -91,6 +121,11 @@ elif 'mac' in _names:
import
macpath
path
=
macpath
del
macpath
import
mac
__all__
.
extend
(
_get_exports_list
(
mac
))
del
mac
elif
'ce'
in
_names
:
name
=
'ce'
linesep
=
'
\r\n
'
...
...
@@ -106,13 +141,22 @@ elif 'ce' in _names:
import
ntpath
path
=
ntpath
del
ntpath
import
ce
__all__
.
extend
(
_get_exports_list
(
ce
))
del
ce
else
:
raise
ImportError
,
'no os specific module found'
__all__
.
append
(
"path"
)
del
_names
sys
.
modules
[
'os.path'
]
=
path
#'
# Super directory utilities.
# (Inspired by Eric Raymond; the doc strings are mostly his)
...
...
@@ -180,6 +224,8 @@ def renames(old, new):
except
error
:
pass
__all__
.
extend
([
"makedirs"
,
"removedirs"
,
"renames"
])
# Make sure os.environ exists, at least
try
:
environ
...
...
@@ -234,6 +280,8 @@ def execvpe(file, args, env):
args may be a list or tuple of strings. """
_execvpe
(
file
,
args
,
env
)
__all__
.
extend
([
"execl"
,
"execle"
,
"execlp"
,
"execlpe"
,
"execvp"
,
"execvpe"
])
_notfound
=
None
def
_execvpe
(
file
,
args
,
env
=
None
):
if
env
is
not
None
:
...
...
@@ -319,6 +367,7 @@ def getenv(key, default=None):
The optional second argument can specify an alternate default."""
return
environ
.
get
(
key
,
default
)
__all__
.
append
(
"getenv"
)
def
_exists
(
name
):
try
:
...
...
@@ -454,6 +503,10 @@ otherwise return -SIG, where SIG is the signal that killed it. """
return
spawnvpe
(
mode
,
file
,
args
[:
-
1
],
env
)
__all__
.
extend
([
"spawnlp"
,
"spawnlpe"
,
"spawnv"
,
"spawnve"
,
"spawnvp"
,
"spawnvpe"
,
"spawnl"
,
"spawnle"
,])
# Supply popen2 etc. (for Unix)
if
_exists
(
"fork"
):
if
not
_exists
(
"popen2"
):
...
...
@@ -461,15 +514,18 @@ if _exists("fork"):
import
popen2
stdout
,
stdin
=
popen2
.
popen2
(
cmd
,
bufsize
)
return
stdin
,
stdout
__all__
.
append
(
"popen2"
)
if
not
_exists
(
"popen3"
):
def
popen3
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
import
popen2
stdout
,
stdin
,
stderr
=
popen2
.
popen3
(
cmd
,
bufsize
)
return
stdin
,
stdout
,
stderr
__all__
.
append
(
"popen3"
)
if
not
_exists
(
"popen4"
):
def
popen4
(
cmd
,
mode
=
"t"
,
bufsize
=-
1
):
import
popen2
stdout
,
stdin
=
popen2
.
popen4
(
cmd
,
bufsize
)
return
stdin
,
stdout
__all__
.
append
(
"popen4"
)
Lib/test/test___all__.py
Dosyayı görüntüle @
269b83bc
...
...
@@ -87,4 +87,11 @@ check_all("mhlib")
check_all
(
"mimetools"
)
check_all
(
"mimetypes"
)
check_all
(
"mimify"
)
check_all
(
"multifile"
)
check_all
(
"mutex"
)
check_all
(
"netrc"
)
check_all
(
"nntplib"
)
check_all
(
"ntpath"
)
check_all
(
"nturl2path"
)
check_all
(
"os"
)
check_all
(
"robotparser"
)
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