From 32363dc8bea1fd12997f314cb424bf72cbe1e599 Mon Sep 17 00:00:00 2001 From: oscar Date: Sat, 17 Apr 2021 14:24:48 +0200 Subject: [PATCH] fixes #841 --- bpython/args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bpython/args.py b/bpython/args.py index 0a60c86e..429ffff4 100644 --- a/bpython/args.py +++ b/bpython/args.py @@ -202,7 +202,7 @@ def exec_code(interpreter, args): spec = importlib.util.spec_from_loader("__console__", loader=None) mod = importlib.util.module_from_spec(spec) sys.modules["__console__"] = mod - interpreter.locals = mod.__dict__ + interpreter.locals.update(mod.__dict__) interpreter.locals["__file__"] = args[0] interpreter.runsource(source, args[0], "exec") sys.argv = old_argv