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
c4a623eb
Kaydet (Commit)
c4a623eb
authored
Nis 22, 1999
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add command line flags to just list the files that contain the
offending lines or to include line numbers in the output.
üst
c8c40ff6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
findmodrefs
Doc/tools/findmodrefs
+20
-2
No files found.
Doc/tools/findmodrefs
Dosyayı görüntüle @
c4a623eb
...
...
@@ -2,6 +2,7 @@
# -*- Python -*-
import
fileinput
import
getopt
import
glob
import
os
import
re
...
...
@@ -15,7 +16,15 @@ module_rx = re.compile(r"\\module{([a-zA-Z_0-9]+)}")
def
main
():
try
:
files
=
sys
.
argv
[
1
:]
just_list
=
0
print_lineno
=
0
opts
,
args
=
getopt
.
getopt
(
sys
.
argv
[
1
:],
"ln"
,
[
"list"
,
"number"
])
for
opt
,
arg
in
opts
:
if
opt
in
(
"-l"
,
"--list"
):
just_list
=
1
elif
opt
in
(
"-n"
,
"--number"
):
print_lineno
=
1
files
=
args
if
not
files
:
files
=
glob
.
glob
(
"*.tex"
)
files
.
sort
()
...
...
@@ -36,7 +45,16 @@ def main():
if
m
:
name
=
m
.
group
(
1
)
if
name
!=
modulename
:
print
"
%
s:
%
s"
%
(
fileinput
.
filename
(),
line
[:
-
1
])
filename
=
fileinput
.
filename
()
if
just_list
:
print
filename
fileinput
.
nextfile
()
modulename
=
None
elif
print_lineno
:
print
"
%
s(
%
d):
%
s"
\
%
(
filename
,
fileinput
.
filelineno
(),
line
[:
-
1
])
else
:
print
"
%
s:
%
s"
%
(
filename
,
line
[:
-
1
])
except
KeyboardInterrupt
:
sys
.
exit
(
1
)
...
...
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