From: Guido van Rossum Date: Thu, 15 Oct 1998 01:38:23 +0000 (+0000) Subject: When run as a script, don't pass a fake __main__ dictionary; use the X-Git-Tag: v1.5.2a2~27 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c2047c19f5afa001261cad45b0ada852450b35bb;p=python When run as a script, don't pass a fake __main__ dictionary; use the real one. --- diff --git a/Lib/pdb.py b/Lib/pdb.py index de769bb87a..fae6b2c604 100755 --- a/Lib/pdb.py +++ b/Lib/pdb.py @@ -893,4 +893,4 @@ if __name__=='__main__': # Insert script directory in front of module search path sys.path.insert(0, os.path.dirname(filename)) - run('execfile(' + `filename` + ')', {'__name__': '__main__'}) + run('execfile(' + `filename` + ')')