File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -243,10 +243,10 @@ def exec_code(
243243 raise SystemExit (e .errno )
244244 old_argv , sys .argv = sys .argv , args
245245 sys .path .insert (0 , os .path .abspath (os .path .dirname (args [0 ])))
246- spec = importlib .util .spec_from_loader ("__console__ " , loader = None )
246+ spec = importlib .util .spec_from_loader ("__main__ " , loader = None )
247247 assert spec
248248 mod = importlib .util .module_from_spec (spec )
249- sys .modules ["__console__ " ] = mod
249+ sys .modules ["__main__ " ] = mod
250250 interpreter .locals .update (mod .__dict__ ) # type: ignore # TODO use a more specific type that has a .locals attribute
251251 interpreter .locals ["__file__" ] = args [0 ] # type: ignore # TODO use a more specific type that has a .locals attribute
252252 interpreter .runsource (source , args [0 ], "exec" )
You can’t perform that action at this time.
0 commit comments