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
d9596e3a
Kaydet (Commit)
d9596e3a
authored
Mar 31, 1992
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
mac -> os
üst
25d7cafd
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
packmail.py
Lib/lib-old/packmail.py
+10
-11
packmail.py
Lib/packmail.py
+10
-11
No files found.
Lib/lib-old/packmail.py
Dosyayı görüntüle @
d9596e3a
# Module 'packmail' -- create a shell script out of some files.
import
mac
import
macpath
import
os
from
stat
import
ST_MTIME
import
string
...
...
@@ -21,25 +20,25 @@ def pack(outfp, file, name):
def
packsome
(
outfp
,
dirname
,
names
):
for
name
in
names
:
print
name
file
=
mac
path
.
join
(
dirname
,
name
)
file
=
os
.
path
.
join
(
dirname
,
name
)
pack
(
outfp
,
file
,
name
)
# Pack all files from a directory
def
packall
(
outfp
,
dirname
):
names
=
mac
.
listdir
(
dirname
)
names
=
os
.
listdir
(
dirname
)
names
.
sort
()
packsome
(
outfp
,
dirname
,
names
)
# Pack all files from a directory that are not older than a give one
def
packnotolder
(
outfp
,
dirname
,
oldest
):
names
=
mac
.
listdir
(
dirname
)
oldest
=
mac
path
.
join
(
dirname
,
oldest
)
st
=
mac
.
stat
(
oldest
)
names
=
os
.
listdir
(
dirname
)
oldest
=
os
.
path
.
join
(
dirname
,
oldest
)
st
=
os
.
stat
(
oldest
)
mtime
=
st
[
ST_MTIME
]
todo
=
[]
for
name
in
names
:
print
name
,
'...'
,
st
=
mac
.
stat
(
mac
path
.
join
(
dirname
,
name
))
st
=
os
.
stat
(
os
.
path
.
join
(
dirname
,
name
))
if
st
[
ST_MTIME
]
>=
mtime
:
print
'Yes.'
todo
.
append
(
name
)
...
...
@@ -52,11 +51,11 @@ def packnotolder(outfp, dirname, oldest):
def
packtree
(
outfp
,
dirname
):
print
'packtree'
,
dirname
outfp
.
write
(
'mkdir '
+
unixfix
(
dirname
)
+
'
\n
'
)
names
=
mac
.
listdir
(
dirname
)
names
=
os
.
listdir
(
dirname
)
subdirs
=
[]
for
name
in
names
:
fullname
=
mac
path
.
join
(
dirname
,
name
)
if
mac
path
.
isdir
(
fullname
):
fullname
=
os
.
path
.
join
(
dirname
,
name
)
if
os
.
path
.
isdir
(
fullname
):
subdirs
.
append
(
fullname
)
else
:
print
'pack'
,
fullname
...
...
Lib/packmail.py
Dosyayı görüntüle @
d9596e3a
# Module 'packmail' -- create a shell script out of some files.
import
mac
import
macpath
import
os
from
stat
import
ST_MTIME
import
string
...
...
@@ -21,25 +20,25 @@ def pack(outfp, file, name):
def
packsome
(
outfp
,
dirname
,
names
):
for
name
in
names
:
print
name
file
=
mac
path
.
join
(
dirname
,
name
)
file
=
os
.
path
.
join
(
dirname
,
name
)
pack
(
outfp
,
file
,
name
)
# Pack all files from a directory
def
packall
(
outfp
,
dirname
):
names
=
mac
.
listdir
(
dirname
)
names
=
os
.
listdir
(
dirname
)
names
.
sort
()
packsome
(
outfp
,
dirname
,
names
)
# Pack all files from a directory that are not older than a give one
def
packnotolder
(
outfp
,
dirname
,
oldest
):
names
=
mac
.
listdir
(
dirname
)
oldest
=
mac
path
.
join
(
dirname
,
oldest
)
st
=
mac
.
stat
(
oldest
)
names
=
os
.
listdir
(
dirname
)
oldest
=
os
.
path
.
join
(
dirname
,
oldest
)
st
=
os
.
stat
(
oldest
)
mtime
=
st
[
ST_MTIME
]
todo
=
[]
for
name
in
names
:
print
name
,
'...'
,
st
=
mac
.
stat
(
mac
path
.
join
(
dirname
,
name
))
st
=
os
.
stat
(
os
.
path
.
join
(
dirname
,
name
))
if
st
[
ST_MTIME
]
>=
mtime
:
print
'Yes.'
todo
.
append
(
name
)
...
...
@@ -52,11 +51,11 @@ def packnotolder(outfp, dirname, oldest):
def
packtree
(
outfp
,
dirname
):
print
'packtree'
,
dirname
outfp
.
write
(
'mkdir '
+
unixfix
(
dirname
)
+
'
\n
'
)
names
=
mac
.
listdir
(
dirname
)
names
=
os
.
listdir
(
dirname
)
subdirs
=
[]
for
name
in
names
:
fullname
=
mac
path
.
join
(
dirname
,
name
)
if
mac
path
.
isdir
(
fullname
):
fullname
=
os
.
path
.
join
(
dirname
,
name
)
if
os
.
path
.
isdir
(
fullname
):
subdirs
.
append
(
fullname
)
else
:
print
'pack'
,
fullname
...
...
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