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
dbbf76bd
Kaydet (Commit)
dbbf76bd
authored
Tem 09, 2000
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Make tabnanny happy.
mailbox.py: Convert to 4-space indents.
üst
c2844af8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
11 deletions
+12
-11
mailbox.py
Lib/mailbox.py
+0
-0
shlex.py
Lib/shlex.py
+12
-11
No files found.
Lib/mailbox.py
Dosyayı görüntüle @
dbbf76bd
This diff is collapsed.
Click to expand it.
Lib/shlex.py
Dosyayı görüntüle @
dbbf76bd
...
...
@@ -17,7 +17,8 @@ class shlex:
self
.
instream
=
sys
.
stdin
self
.
infile
=
None
self
.
commenters
=
'#'
self
.
wordchars
=
'abcdfeghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
self
.
wordchars
=
(
'abcdfeghijklmnopqrstuvwxyz'
'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_'
)
self
.
whitespace
=
'
\t\r\n
'
self
.
quotes
=
'
\'
"'
self
.
state
=
' '
...
...
@@ -25,7 +26,7 @@ class shlex:
self
.
lineno
=
1
self
.
debug
=
0
self
.
token
=
''
self
.
filestack
=
[]
self
.
filestack
=
[]
self
.
source
=
None
if
self
.
debug
:
print
'shlex: reading from
%
s, line
%
d'
\
...
...
@@ -45,7 +46,7 @@ class shlex:
if
self
.
debug
>=
1
:
print
"shlex: popping token "
+
`tok`
return
tok
# No pushback. Get a token.
# No pushback. Get a token.
raw
=
self
.
read_token
()
# Handle inclusions
while
raw
==
self
.
source
:
...
...
@@ -88,18 +89,18 @@ class shlex:
if
self
.
debug
>=
3
:
print
"shlex: in state"
,
repr
(
self
.
state
),
\
"I see character:"
,
repr
(
nextchar
)
if
self
.
state
==
None
:
self
.
token
=
''
;
# past end of file
if
self
.
state
is
None
:
self
.
token
=
''
;
# past end of file
break
elif
self
.
state
==
' '
:
if
not
nextchar
:
self
.
state
=
None
;
# end of file
self
.
state
=
None
;
# end of file
break
elif
nextchar
in
self
.
whitespace
:
if
self
.
debug
>=
2
:
print
"shlex: I see whitespace in whitespace state"
if
self
.
token
:
break
# emit current token
break
# emit current token
else
:
continue
elif
nextchar
in
self
.
commenters
:
...
...
@@ -114,7 +115,7 @@ class shlex:
else
:
self
.
token
=
nextchar
if
self
.
token
:
break
# emit current token
break
# emit current token
else
:
continue
elif
self
.
state
in
self
.
quotes
:
...
...
@@ -124,14 +125,14 @@ class shlex:
break
elif
self
.
state
==
'a'
:
if
not
nextchar
:
self
.
state
=
None
;
# end of file
self
.
state
=
None
;
# end of file
break
elif
nextchar
in
self
.
whitespace
:
if
self
.
debug
>=
2
:
print
"shlex: I see whitespace in word state"
self
.
state
=
' '
if
self
.
token
:
break
# emit current token
break
# emit current token
else
:
continue
elif
nextchar
in
self
.
commenters
:
...
...
@@ -145,7 +146,7 @@ class shlex:
print
"shlex: I see punctuation in word state"
self
.
state
=
' '
if
self
.
token
:
break
# emit current token
break
# emit current token
else
:
continue
result
=
self
.
token
...
...
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