Issue 1254: pdb fails to launch some script. (original) (raw)

Issue1254

Created on 2007-10-10 14:02 by romain_jacquet, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
bug.py romain_jacquet,2007-10-10 14:02
Messages (2)
msg56312 - (view) Author: Romain JACQUET (romain_jacquet) Date: 2007-10-10 14:02
Pdb fails to launch any scripts that uses the __file__ builtin. This problem occurs because pdb does not set the global environnement correctly. It can be corrected by setting the global variable __file__ before pdb executes the file. Lib/pdb.py: Replace : globals_ = {"__name__" : "__main__"} by: globals_ = {"__name__" : "__main__", "__file__": filename} The problem happens also in python 2.5.
msg57410 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2007-11-12 17:35
Fixed in r58950 for Python 2.5. Python 2.6 and 3k are already fixed.
History
Date User Action Args
2022-04-11 14:56:27 admin set github: 45595
2007-11-12 17:35:21 christian.heimes set status: open -> closedresolution: fixedmessages: + nosy: + christian.heimesversions: + Python 2.5
2007-10-10 14:02:30 romain_jacquet create