Message280117
This patch is an attempt at allowing the source debugging of scripts executed by the Python exec() function. It misses tests and documentation.
You may use it using the idiom given in the following example to avoid stepping into the pdb code on the first invocation of pdb.exec_script() (see the exec_script() doc string):
import sys
def main():
foo = 123
s = """if 1:
x = foo
x = 555
"""
exec_script(s)
if __name__ == '__main__':
if '--debug' in sys.argv[1:]:
import pdb
exec_script = pdb.exec_script
pdb.Pdb(skip=['pdb']).set_trace()
else:
exec_script = exec
main() |
|
Date |
User |
Action |
Args |
2016-11-05 16:51:50 | xdegaye | set | recipients:
+ xdegaye, Pinku Surana |
2016-11-05 16:51:50 | xdegaye | set | messageid: <1478364710.17.0.397025971918.issue28610@psf.upfronthosting.co.za> |
2016-11-05 16:51:50 | xdegaye | link | issue28610 messages |
2016-11-05 16:51:49 | xdegaye | create | |
|