Amaury Forgeot d'Arc added the comment:

This change will cause the module to be imported twice:
    progname = runpy.run_module(args[0])['__file__']
... and then the runctx() call.

What about something like:
    code = "runpy.run_module(modname, run_name='__main__')"
    globs = { 'runpy': runpy, 'modname': args[0] }

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21862>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to