Popa Claudiu <[email protected]> added the comment:
I found the culprit. I wrote b"\x" in IDLE and the window immediatly
disappeared. Then, to traceback the problem, I started a python shell and typed
the following lines. It seems that in showsyntaxerror, value is different that
what was expected.
C:\>python
Python 3.2.1 (default, Jul 10 2011, 21:51:15) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import idlelib.PyShell
>>> idlelib.PyShell.main()
Exception in Tkinter callback
Traceback (most recent call last):
File "C:\Python32\lib\code.py", line 63, in runsource
code = self.compile(source, filename, symbol)
File "C:\Python32\lib\codeop.py", line 168, in __call__
return _maybe_compile(self.compiler, source, filename, symbol)
File "C:\Python32\lib\codeop.py", line 82, in _maybe_compile
code = compiler(source, filename, symbol)
File "C:\Python32\lib\codeop.py", line 133, in __call__
codeob = compile(source, filename, symbol, self.flags, 1)
ValueError: invalid \x escape
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Python32\lib\tkinter\__init__.py", line 1399, in __call__
return self.func(*args)
File "C:\Python32\lib\idlelib\MultiCall.py", line 166, in handler
r = l[i](event)
File "C:\Python32\lib\idlelib\PyShell.py", line 1126, in enter_callback
self.runit()
File "C:\Python32\lib\idlelib\PyShell.py", line 1167, in runit
more = self.interp.runsource(line)
File "C:\Python32\lib\idlelib\PyShell.py", line 617, in runsource
return InteractiveInterpreter.runsource(self, source, filename)
File "C:\Python32\lib\code.py", line 66, in runsource
self.showsyntaxerror(filename)
File "C:\Python32\lib\idlelib\PyShell.py", line 654, in showsyntaxerror
msg = value.msg or "<no detail available>"
AttributeError: 'ValueError' object has no attribute 'msg'
>>>
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue9871>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com