diff options
author | Georg Brandl <georg@python.org> | 2009-08-13 07:52:08 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-08-13 07:52:08 (GMT) |
commit | 8a038b283b5fb93f65459bd3fd056fd9ff29efb1 (patch) | |
tree | 6f0d5b18d194bc2fbb6a56bb2908877847cedd88 /Lib | |
parent | 606bbc9b9f25b02bca1e7224976d55f8f6ccc616 (diff) | |
download | cpython-8a038b283b5fb93f65459bd3fd056fd9ff29efb1.zip cpython-8a038b283b5fb93f65459bd3fd056fd9ff29efb1.tar.gz cpython-8a038b283b5fb93f65459bd3fd056fd9ff29efb1.tar.bz2 |
Merged revisions 74366 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k
........
r74366 | georg.brandl | 2009-08-13 09:50:57 +0200 (Do, 13 Aug 2009) | 1 line
#6126: fix pdb stepping and breakpoints by giving the executed code the correct filename; this used execfile() in 2.x which did this automatically.
........
Diffstat (limited to 'Lib')
-rwxr-xr-x | Lib/pdb.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -1210,8 +1210,9 @@ see no sign that the breakpoint was reached. self._wait_for_mainpyfile = 1 self.mainpyfile = self.canonic(filename) self._user_requested_quit = 0 - with open(filename) as fp: - statement = "exec(%r)" % (fp.read(),) + with open(filename, "rb") as fp: + statement = "exec(compile(%r, %r, 'exec'))" % \ + (fp.read(), self.mainpyfile) self.run(statement) # Simplified interface |