In my python code, I have this line:
try:
result = eval(command, self.globals, self.locals)
except SyntaxError:
exec(command, self.globals, self.locals)
A variable commandcan be any string. Consequently, the python debugger pdbcan be started in eval/ execand still active when eval/ is returned exec. What I want to do is make sure that normal program execution resumes when I return from eval/ exec. To just give you an idea, this is about the behavior I want:
try:
result = eval(command, self.globals, self.locals)
try: self.globals['pdb'].run('continue')
except: pass
except SyntaxError:
exec(command, self.globals, self.locals)
try: self.globals['pdb'].run('continue')
except: pass
try , , . ... , , - , except.
, ?
< > :
IPython bpython, , , .
import pdb
pdb.set_trace()
next
, cpython, python. , , , python, - . , , python.
>