[New-bugs-announce] [issue24957] python3 -mpdb gets stuck in an unexitable infinite prompt loop when running some Python 2 code with syntax errors
Shlomi Fish
report at bugs.python.org
Sat Aug 29 17:44:54 CEST 2015
New submission from Shlomi Fish:
I tried Ctrl+C, Ctrl+D, "quit" and "exit", and "q" - nothing exits from the infinite prompt loop.
shlomif at telaviv1:~/Docs/homepage/homepage/trunk$ cd /home/shlomif/progs/riddles/project-euler/hg/project-euler/234
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$ ls
brute-force.pl euler-234-description.txt euler-234-v1.py
brute-force.pl~ euler-234-description.txt~ euler-234-v1.py~
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$ python3 euler-234-v1.py
File "euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$ python3 -mpdb euler-234-v1.py 1000
Traceback (most recent call last):
File "/usr/lib64/python3.4/pdb.py", line 1661, in main
pdb._runscript(mainpyfile)
File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript
self.run(statement)
File "/usr/lib64/python3.4/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/home/shlomif/progs/riddles/project-euler/hg/project-euler/234/euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb)
(Pdb) exit
Post mortem debugger finished. The euler-234-v1.py will be restarted
Traceback (most recent call last):
File "/usr/lib64/python3.4/pdb.py", line 1661, in main
pdb._runscript(mainpyfile)
File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript
self.run(statement)
File "/usr/lib64/python3.4/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/home/shlomif/progs/riddles/project-euler/hg/project-euler/234/euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb) quit
Post mortem debugger finished. The euler-234-v1.py will be restarted
Traceback (most recent call last):
File "/usr/lib64/python3.4/pdb.py", line 1661, in main
pdb._runscript(mainpyfile)
File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript
self.run(statement)
File "/usr/lib64/python3.4/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/home/shlomif/progs/riddles/project-euler/hg/project-euler/234/euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb)
Post mortem debugger finished. The euler-234-v1.py will be restarted
Traceback (most recent call last):
File "/usr/lib64/python3.4/pdb.py", line 1661, in main
pdb._runscript(mainpyfile)
File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript
self.run(statement)
File "/usr/lib64/python3.4/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/home/shlomif/progs/riddles/project-euler/hg/project-euler/234/euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb) --KeyboardInterrupt--
(Pdb) --KeyboardInterrupt--
(Pdb) exit
Post mortem debugger finished. The euler-234-v1.py will be restarted
Traceback (most recent call last):
File "/usr/lib64/python3.4/pdb.py", line 1661, in main
pdb._runscript(mainpyfile)
File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript
self.run(statement)
File "/usr/lib64/python3.4/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/home/shlomif/progs/riddles/project-euler/hg/project-euler/234/euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb) quit
Post mortem debugger finished. The euler-234-v1.py will be restarted
Traceback (most recent call last):
File "/usr/lib64/python3.4/pdb.py", line 1661, in main
pdb._runscript(mainpyfile)
File "/usr/lib64/python3.4/pdb.py", line 1542, in _runscript
self.run(statement)
File "/usr/lib64/python3.4/bdb.py", line 431, in run
exec(cmd, globals, locals)
File "<string>", line 1, in <module>
File "/home/shlomif/progs/riddles/project-euler/hg/project-euler/234/euler-234-v1.py", line 21
print "Found[] = ", n
^
SyntaxError: Missing parentheses in call to 'print'
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
> <string>(1)<module>()
(Pdb)
[1]+ Stopped python3 -mpdb euler-234-v1.py 1000
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$ kill %1
[1]+ Stopped python3 -mpdb euler-234-v1.py 1000
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$
[1]+ Terminated python3 -mpdb euler-234-v1.py 1000
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$ jobs
shlomif at telaviv1:~/progs/riddles/project-euler/hg/project-euler/234$
----------
components: Library (Lib)
files: euler-234-v1.py
messages: 249319
nosy: shlomif
priority: normal
severity: normal
status: open
title: python3 -mpdb gets stuck in an unexitable infinite prompt loop when running some Python 2 code with syntax errors
versions: Python 3.4
Added file: http://bugs.python.org/file40292/euler-234-v1.py
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24957>
_______________________________________
More information about the New-bugs-announce
mailing list