diff options
Diffstat (limited to 'ptpython/entry_points/run_ptipython.py')
-rw-r--r-- | ptpython/entry_points/run_ptipython.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ptpython/entry_points/run_ptipython.py b/ptpython/entry_points/run_ptipython.py index 650633e..21d7063 100644 --- a/ptpython/entry_points/run_ptipython.py +++ b/ptpython/entry_points/run_ptipython.py @@ -31,7 +31,7 @@ def run(user_ns=None): path = a.args[0] with open(path, "rb") as f: code = compile(f.read(), path, "exec") - exec(code, {}) + exec(code, {"__name__": "__main__", "__file__": path}) else: enable_deprecation_warnings() |