mirror of
https://github.com/python/cpython.git
synced 2025-07-16 07:45:20 +00:00
When run as a script, don't pass a fake __main__ dictionary; use the
real one.
This commit is contained in:
parent
e0e59829e0
commit
c2047c19f5
1 changed files with 1 additions and 1 deletions
|
@ -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` + ')')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue