Brett Cannon <br...@python.org> added the comment:

Nick is right that importing package.__main__ requires importing 
package.__init__ first.

But it sounds like Michael really just wants some way to know when runpy is 
being used over something else. Could a special string token like "<runpy>" or 
"<-m>" be placed in sys.argv until it is back-patched to what it will 
eventually become? That should allow Michael to find out what whether runpy was 
being used or not.

----------

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

Reply via email to