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
6e44cc23
Kaydet (Commit)
6e44cc23
authored
Kas 30, 2002
tarafından
Kurt B. Kaiser
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
M PyShell.py
M rpc.py SF Bug 629987: Idle not printing prompts following SyntaxError
üst
a59ef7bb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
17 deletions
+20
-17
PyShell.py
Lib/idlelib/PyShell.py
+18
-16
rpc.py
Lib/idlelib/rpc.py
+2
-1
No files found.
Lib/idlelib/PyShell.py
Dosyayı görüntüle @
6e44cc23
#! /usr/bin/env python
import
os
import
os.path
import
sys
import
string
import
getopt
...
...
@@ -24,7 +25,6 @@ from UndoDelegator import UndoDelegator
from
OutputWindow
import
OutputWindow
from
configHandler
import
idleConf
import
idlever
import
os.path
import
rpc
import
RemoteDebugger
...
...
@@ -417,6 +417,7 @@ class ModifiedInterpreter(InteractiveInterpreter):
except
(
OverflowError
,
SyntaxError
):
self
.
tkconsole
.
resetoutput
()
InteractiveInterpreter
.
showsyntaxerror
(
self
,
filename
)
self
.
tkconsole
.
showprompt
()
else
:
self
.
runcode
(
code
)
...
...
@@ -458,23 +459,24 @@ class ModifiedInterpreter(InteractiveInterpreter):
"""
text
=
self
.
tkconsole
.
text
stuff
=
self
.
unpackerror
()
if
not
stuff
:
if
stuff
:
msg
,
lineno
,
offset
,
line
=
stuff
if
lineno
==
1
:
pos
=
"iomark +
%
d chars"
%
(
offset
-
1
)
else
:
pos
=
"iomark linestart +
%
d lines +
%
d chars"
%
\
(
lineno
-
1
,
offset
-
1
)
text
.
tag_add
(
"ERROR"
,
pos
)
text
.
see
(
pos
)
char
=
text
.
get
(
pos
)
if
char
and
char
in
IDENTCHARS
:
text
.
tag_add
(
"ERROR"
,
pos
+
" wordstart"
,
pos
)
self
.
tkconsole
.
resetoutput
()
InteractiveInterpreter
.
showsyntaxerror
(
self
,
filename
)
return
msg
,
lineno
,
offset
,
line
=
stuff
if
lineno
==
1
:
pos
=
"iomark +
%
d chars"
%
(
offset
-
1
)
self
.
write
(
"SyntaxError:
%
s
\n
"
%
str
(
msg
))
else
:
pos
=
"iomark linestart +
%
d lines +
%
d chars"
%
(
lineno
-
1
,
offset
-
1
)
text
.
tag_add
(
"ERROR"
,
pos
)
text
.
see
(
pos
)
char
=
text
.
get
(
pos
)
if
char
and
char
in
IDENTCHARS
:
text
.
tag_add
(
"ERROR"
,
pos
+
" wordstart"
,
pos
)
self
.
tkconsole
.
resetoutput
()
self
.
write
(
"SyntaxError:
%
s
\n
"
%
str
(
msg
))
self
.
tkconsole
.
resetoutput
()
InteractiveInterpreter
.
showsyntaxerror
(
self
,
filename
)
self
.
tkconsole
.
showprompt
()
def
unpackerror
(
self
):
type
,
value
,
tb
=
sys
.
exc_info
()
...
...
Lib/idlelib/rpc.py
Dosyayı görüntüle @
6e44cc23
...
...
@@ -90,7 +90,7 @@ objecttable = {}
class
SocketIO
:
debugging
=
0
debugging
=
False
def
__init__
(
self
,
sock
,
objtable
=
None
,
debugging
=
None
):
self
.
mainthread
=
threading
.
currentThread
()
...
...
@@ -189,6 +189,7 @@ class SocketIO:
def
asyncreturn
(
self
,
seq
):
response
=
self
.
getresponse
(
seq
)
self
.
debug
(
"asyncreturn:"
,
response
)
return
self
.
decoderesponse
(
response
)
def
decoderesponse
(
self
,
response
):
...
...
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