When run as a script, don't pass a fake __main__ dictionary; use the

real one.
This commit is contained in:
Guido van Rossum 1998-10-15 01:38:23 +00:00
parent e0e59829e0
commit c2047c19f5
1 changed files with 1 additions and 1 deletions

View File

@ -893,4 +893,4 @@ def help():
# 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` + ')')