From 5827922b3cb527121682e8be435ea372976dd2cf Mon Sep 17 00:00:00 2001 From: Alex Frieder Date: Sat, 8 Jul 2017 18:07:17 -0400 Subject: [PATCH] Change __name__ to '__main__' --- bpython/args.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bpython/args.py b/bpython/args.py index 1dfe010df..e5780704b 100644 --- a/bpython/args.py +++ b/bpython/args.py @@ -117,8 +117,8 @@ def exec_code(interpreter, args): source = sourcefile.read() old_argv, sys.argv = sys.argv, args sys.path.insert(0, os.path.abspath(os.path.dirname(args[0]))) - mod = imp.new_module('__console__') - sys.modules['__console__'] = mod + mod = imp.new_module('__main__') + sys.modules['__main__'] = mod interpreter.locals = mod.__dict__ interpreter.locals['__file__'] = args[0] interpreter.runsource(source, args[0], 'exec') pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy