mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
noted obsolescence; exec() -> exec
This commit is contained in:
parent
894a7bb995
commit
a62b1003a6
2 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
||||||
# Print tracebacks, with a dump of local variables.
|
# Print tracebacks, with a dump of local variables.
|
||||||
# Also an interactive stack trace browser.
|
# Also an interactive stack trace browser.
|
||||||
|
# Note -- this module is obsolete -- use pdb.pm() instead.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -71,7 +72,7 @@ def browserexec(tb, cmd):
|
||||||
locals = tb.tb_frame.f_locals
|
locals = tb.tb_frame.f_locals
|
||||||
globals = tb.tb_frame.f_globals
|
globals = tb.tb_frame.f_globals
|
||||||
try:
|
try:
|
||||||
exec(cmd+'\n', globals, locals)
|
exec cmd+'\n' in globals, locals
|
||||||
except:
|
except:
|
||||||
print '*** Exception:',
|
print '*** Exception:',
|
||||||
if type(sys.exc_type) == type(''):
|
if type(sys.exc_type) == type(''):
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
# Print tracebacks, with a dump of local variables.
|
# Print tracebacks, with a dump of local variables.
|
||||||
# Also an interactive stack trace browser.
|
# Also an interactive stack trace browser.
|
||||||
|
# Note -- this module is obsolete -- use pdb.pm() instead.
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
@ -71,7 +72,7 @@ def browserexec(tb, cmd):
|
||||||
locals = tb.tb_frame.f_locals
|
locals = tb.tb_frame.f_locals
|
||||||
globals = tb.tb_frame.f_globals
|
globals = tb.tb_frame.f_globals
|
||||||
try:
|
try:
|
||||||
exec(cmd+'\n', globals, locals)
|
exec cmd+'\n' in globals, locals
|
||||||
except:
|
except:
|
||||||
print '*** Exception:',
|
print '*** Exception:',
|
||||||
if type(sys.exc_type) == type(''):
|
if type(sys.exc_type) == type(''):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue