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
7fbb9d11
Kaydet (Commit)
7fbb9d11
authored
Mar 24, 2006
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
SF bug #1457411, fix errors using variables that don't exist.
Rename file -> filename to be clear. Will backport.
üst
51ef6f90
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
byext.py
Tools/scripts/byext.py
+8
-8
No files found.
Tools/scripts/byext.py
Dosyayı görüntüle @
7fbb9d11
...
@@ -17,7 +17,7 @@ class Stats:
...
@@ -17,7 +17,7 @@ class Stats:
elif
os
.
path
.
isfile
(
arg
):
elif
os
.
path
.
isfile
(
arg
):
self
.
statfile
(
arg
)
self
.
statfile
(
arg
)
else
:
else
:
sys
.
stderr
.
write
(
"Can't find
%
s
\n
"
%
file
)
sys
.
stderr
.
write
(
"Can't find
%
s
\n
"
%
arg
)
self
.
addstats
(
"<???>"
,
"unknown"
,
1
)
self
.
addstats
(
"<???>"
,
"unknown"
,
1
)
def
statdir
(
self
,
dir
):
def
statdir
(
self
,
dir
):
...
@@ -25,8 +25,8 @@ class Stats:
...
@@ -25,8 +25,8 @@ class Stats:
try
:
try
:
names
=
os
.
listdir
(
dir
)
names
=
os
.
listdir
(
dir
)
except
os
.
error
,
err
:
except
os
.
error
,
err
:
sys
.
stderr
.
write
(
"Can't list
%
s:
%
s
\n
"
%
(
file
,
err
))
sys
.
stderr
.
write
(
"Can't list
%
s:
%
s
\n
"
%
(
dir
,
err
))
self
.
addstats
(
ext
,
"unlistable"
,
1
)
self
.
addstats
(
"<dir>"
,
"unlistable"
,
1
)
return
return
names
.
sort
()
names
.
sort
()
for
name
in
names
:
for
name
in
names
:
...
@@ -42,9 +42,9 @@ class Stats:
...
@@ -42,9 +42,9 @@ class Stats:
else
:
else
:
self
.
statfile
(
full
)
self
.
statfile
(
full
)
def
statfile
(
self
,
file
):
def
statfile
(
self
,
file
name
):
head
,
ext
=
os
.
path
.
splitext
(
file
)
head
,
ext
=
os
.
path
.
splitext
(
file
name
)
head
,
base
=
os
.
path
.
split
(
file
)
head
,
base
=
os
.
path
.
split
(
file
name
)
if
ext
==
base
:
if
ext
==
base
:
ext
=
""
# E.g. .cvsignore is deemed not to have an extension
ext
=
""
# E.g. .cvsignore is deemed not to have an extension
ext
=
os
.
path
.
normcase
(
ext
)
ext
=
os
.
path
.
normcase
(
ext
)
...
@@ -52,9 +52,9 @@ class Stats:
...
@@ -52,9 +52,9 @@ class Stats:
ext
=
"<none>"
ext
=
"<none>"
self
.
addstats
(
ext
,
"files"
,
1
)
self
.
addstats
(
ext
,
"files"
,
1
)
try
:
try
:
f
=
open
(
file
,
"rb"
)
f
=
open
(
file
name
,
"rb"
)
except
IOError
,
err
:
except
IOError
,
err
:
sys
.
stderr
.
write
(
"Can't open
%
s:
%
s
\n
"
%
(
file
,
err
))
sys
.
stderr
.
write
(
"Can't open
%
s:
%
s
\n
"
%
(
file
name
,
err
))
self
.
addstats
(
ext
,
"unopenable"
,
1
)
self
.
addstats
(
ext
,
"unopenable"
,
1
)
return
return
data
=
f
.
read
()
data
=
f
.
read
()
...
...
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