This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author romain_jacquet
Recipients romain_jacquet
Date 2007-10-10.14:02:29
SpamBayes Score 0.011331048
Marked as misclassified No
Message-id <1192024950.07.0.645250068829.issue1254@psf.upfronthosting.co.za>
In-reply-to
Content
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.
Files
File name Uploaded
bug.py romain_jacquet, 2007-10-10.14:02:29
History
Date User Action Args
2007-10-10 14:02:30romain_jacquetsetspambayes_score: 0.011331 -> 0.011331048
recipients: + romain_jacquet
2007-10-10 14:02:30romain_jacquetsetspambayes_score: 0.011331 -> 0.011331
messageid: <1192024950.07.0.645250068829.issue1254@psf.upfronthosting.co.za>
2007-10-10 14:02:29romain_jacquetlinkissue1254 messages
2007-10-10 14:02:29romain_jacquetcreate