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
6453c1f2
Kaydet (Commit)
6453c1f2
authored
Kas 30, 2002
tarafından
Neal Norwitz
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Cleanup:
* Remove unused imports * Convert some more 1/0 to True/False * Shorten up a long line
üst
539594f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
+5
-9
ScriptBinding.py
Lib/idlelib/ScriptBinding.py
+5
-9
No files found.
Lib/idlelib/ScriptBinding.py
Dosyayı görüntüle @
6453c1f2
...
...
@@ -17,9 +17,6 @@ XXX Redesign this interface (yet again) as follows:
"""
import
sys
import
os
import
imp
import
tkMessageBox
indent_message
=
"""Error: Inconsistent indentation detected!
...
...
@@ -69,15 +66,14 @@ class ScriptBinding:
try
:
tabnanny
.
process_tokens
(
tokenize
.
generate_tokens
(
f
.
readline
))
except
tokenize
.
TokenError
,
msg
:
self
.
errorbox
(
"Token error"
,
"Token error:
\n
%
s"
%
str
(
msg
))
return
0
self
.
errorbox
(
"Token error"
,
"Token error:
\n
%
s"
%
msg
)
return
False
except
tabnanny
.
NannyNag
,
nag
:
# The error messages from tabnanny are too confusing...
self
.
editwin
.
gotoline
(
nag
.
get_lineno
())
self
.
errorbox
(
"Tab/space error"
,
indent_message
)
return
0
return
1
return
False
return
True
def
checksyntax
(
self
,
filename
):
f
=
open
(
filename
,
'r'
)
...
...
@@ -103,7 +99,7 @@ class ScriptBinding:
self
.
editwin
.
gotoline
(
lineno
)
self
.
errorbox
(
"Syntax error"
,
"There's an error in your program:
\n
"
+
msg
)
return
1
return
True
def
run_script_event
(
self
,
event
):
filename
=
self
.
getfilename
()
...
...
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