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
fbe0a8e0
Kaydet (Commit)
fbe0a8e0
authored
Agu 16, 1991
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
macpath.cat --> join
üst
0b744802
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
12 deletions
+15
-12
packmail.py
Lib/lib-old/packmail.py
+4
-4
macpath.py
Lib/macpath.py
+6
-3
packmail.py
Lib/packmail.py
+4
-4
maccache.py
Mac/Lib/maccache.py
+1
-1
No files found.
Lib/lib-old/packmail.py
Dosyayı görüntüle @
fbe0a8e0
...
@@ -21,7 +21,7 @@ def pack(outfp, file, name):
...
@@ -21,7 +21,7 @@ def pack(outfp, file, name):
def
packsome
(
outfp
,
dirname
,
names
):
def
packsome
(
outfp
,
dirname
,
names
):
for
name
in
names
:
for
name
in
names
:
print
name
print
name
file
=
macpath
.
cat
(
dirname
,
name
)
file
=
macpath
.
join
(
dirname
,
name
)
pack
(
outfp
,
file
,
name
)
pack
(
outfp
,
file
,
name
)
# Pack all files from a directory
# Pack all files from a directory
...
@@ -33,13 +33,13 @@ def packall(outfp, dirname):
...
@@ -33,13 +33,13 @@ def packall(outfp, dirname):
# Pack all files from a directory that are not older than a give one
# Pack all files from a directory that are not older than a give one
def
packnotolder
(
outfp
,
dirname
,
oldest
):
def
packnotolder
(
outfp
,
dirname
,
oldest
):
names
=
mac
.
listdir
(
dirname
)
names
=
mac
.
listdir
(
dirname
)
oldest
=
macpath
.
cat
(
dirname
,
oldest
)
oldest
=
macpath
.
join
(
dirname
,
oldest
)
st
=
mac
.
stat
(
oldest
)
st
=
mac
.
stat
(
oldest
)
mtime
=
st
[
ST_MTIME
]
mtime
=
st
[
ST_MTIME
]
todo
=
[]
todo
=
[]
for
name
in
names
:
for
name
in
names
:
print
name
,
'...'
,
print
name
,
'...'
,
st
=
mac
.
stat
(
macpath
.
cat
(
dirname
,
name
))
st
=
mac
.
stat
(
macpath
.
join
(
dirname
,
name
))
if
st
[
ST_MTIME
]
>=
mtime
:
if
st
[
ST_MTIME
]
>=
mtime
:
print
'Yes.'
print
'Yes.'
todo
.
append
(
name
)
todo
.
append
(
name
)
...
@@ -55,7 +55,7 @@ def packtree(outfp, dirname):
...
@@ -55,7 +55,7 @@ def packtree(outfp, dirname):
names
=
mac
.
listdir
(
dirname
)
names
=
mac
.
listdir
(
dirname
)
subdirs
=
[]
subdirs
=
[]
for
name
in
names
:
for
name
in
names
:
fullname
=
macpath
.
cat
(
dirname
,
name
)
fullname
=
macpath
.
join
(
dirname
,
name
)
if
macpath
.
isdir
(
fullname
):
if
macpath
.
isdir
(
fullname
):
subdirs
.
append
(
fullname
)
subdirs
.
append
(
fullname
)
else
:
else
:
...
...
Lib/macpath.py
Dosyayı görüntüle @
fbe0a8e0
...
@@ -15,11 +15,11 @@ def isabs(s):
...
@@ -15,11 +15,11 @@ def isabs(s):
return
':'
in
s
and
s
[
0
]
<>
':'
return
':'
in
s
and
s
[
0
]
<>
':'
#
Concatenate
two pathnames.
#
Join
two pathnames.
# The result is equivalent to what the second pathname would refer to
# The result is equivalent to what the second pathname would refer to
# if the first pathname were the current directory.
# if the first pathname were the current directory.
def
cat
(
s
,
t
):
def
join
(
s
,
t
):
if
(
not
s
)
or
isabs
(
t
):
return
t
if
(
not
s
)
or
isabs
(
t
):
return
t
if
t
[:
1
]
=
':'
:
t
=
t
[
1
:]
if
t
[:
1
]
=
':'
:
t
=
t
[
1
:]
if
':'
not
in
s
:
if
':'
not
in
s
:
...
@@ -29,9 +29,12 @@ def cat(s, t):
...
@@ -29,9 +29,12 @@ def cat(s, t):
return
s
+
t
return
s
+
t
cat
=
join
# For compatibility
# Split a pathname in two parts: the directory leading up to the final bit,
# Split a pathname in two parts: the directory leading up to the final bit,
# and the basename (the filename, without colons, in that directory).
# and the basename (the filename, without colons, in that directory).
# The result (s, t) is such that
cat
(s, t) yields the original argument.
# The result (s, t) is such that
join
(s, t) yields the original argument.
def
split
(
s
):
def
split
(
s
):
if
':'
not
in
s
:
return
''
,
s
if
':'
not
in
s
:
return
''
,
s
...
...
Lib/packmail.py
Dosyayı görüntüle @
fbe0a8e0
...
@@ -21,7 +21,7 @@ def pack(outfp, file, name):
...
@@ -21,7 +21,7 @@ def pack(outfp, file, name):
def
packsome
(
outfp
,
dirname
,
names
):
def
packsome
(
outfp
,
dirname
,
names
):
for
name
in
names
:
for
name
in
names
:
print
name
print
name
file
=
macpath
.
cat
(
dirname
,
name
)
file
=
macpath
.
join
(
dirname
,
name
)
pack
(
outfp
,
file
,
name
)
pack
(
outfp
,
file
,
name
)
# Pack all files from a directory
# Pack all files from a directory
...
@@ -33,13 +33,13 @@ def packall(outfp, dirname):
...
@@ -33,13 +33,13 @@ def packall(outfp, dirname):
# Pack all files from a directory that are not older than a give one
# Pack all files from a directory that are not older than a give one
def
packnotolder
(
outfp
,
dirname
,
oldest
):
def
packnotolder
(
outfp
,
dirname
,
oldest
):
names
=
mac
.
listdir
(
dirname
)
names
=
mac
.
listdir
(
dirname
)
oldest
=
macpath
.
cat
(
dirname
,
oldest
)
oldest
=
macpath
.
join
(
dirname
,
oldest
)
st
=
mac
.
stat
(
oldest
)
st
=
mac
.
stat
(
oldest
)
mtime
=
st
[
ST_MTIME
]
mtime
=
st
[
ST_MTIME
]
todo
=
[]
todo
=
[]
for
name
in
names
:
for
name
in
names
:
print
name
,
'...'
,
print
name
,
'...'
,
st
=
mac
.
stat
(
macpath
.
cat
(
dirname
,
name
))
st
=
mac
.
stat
(
macpath
.
join
(
dirname
,
name
))
if
st
[
ST_MTIME
]
>=
mtime
:
if
st
[
ST_MTIME
]
>=
mtime
:
print
'Yes.'
print
'Yes.'
todo
.
append
(
name
)
todo
.
append
(
name
)
...
@@ -55,7 +55,7 @@ def packtree(outfp, dirname):
...
@@ -55,7 +55,7 @@ def packtree(outfp, dirname):
names
=
mac
.
listdir
(
dirname
)
names
=
mac
.
listdir
(
dirname
)
subdirs
=
[]
subdirs
=
[]
for
name
in
names
:
for
name
in
names
:
fullname
=
macpath
.
cat
(
dirname
,
name
)
fullname
=
macpath
.
join
(
dirname
,
name
)
if
macpath
.
isdir
(
fullname
):
if
macpath
.
isdir
(
fullname
):
subdirs
.
append
(
fullname
)
subdirs
.
append
(
fullname
)
else
:
else
:
...
...
Mac/Lib/maccache.py
Dosyayı görüntüle @
fbe0a8e0
...
@@ -25,7 +25,7 @@ FILE = 1
...
@@ -25,7 +25,7 @@ FILE = 1
LISTTYPE
=
type
([])
LISTTYPE
=
type
([])
def
_stat
(
name
):
def
_stat
(
name
):
name
=
macpath
.
cat
(
cwd
,
name
)
name
=
macpath
.
join
(
cwd
,
name
)
if
cache
.
has_key
(
name
):
if
cache
.
has_key
(
name
):
return
cache
[
name
]
return
cache
[
name
]
if
macpath
.
isfile
(
name
):
if
macpath
.
isfile
(
name
):
...
...
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