homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author sbt
Recipients Olivier.Grisel, brett.cannon, eric.snow, larry, ncoghlan, pitrou, python-dev, sbt
Date 2013年12月15日.20:11:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1387138268.34.0.239760945398.issue19946@psf.upfronthosting.co.za>
In-reply-to
Content
> I appear to be somehow getting child processes where __main__.__file__ is
> set, but __main__.__spec__ is not.
That seems to be true for the __main__ module even when multiprocessing is not involved. Running a file /tmp/foo.py containing
 import sys
 print(sys.modules['__main__'].__spec__, sys.modules['__main__'].__file__)
I get output
 None /tmp/foo.py
I am confused by why you would ever want to load by module name rather than file name. What problem would that fix? If the idea is just to support importing a main module without a .py extension, isn't __file__ good enough?
History
Date User Action Args
2013年12月15日 20:11:08sbtsetrecipients: + sbt, brett.cannon, ncoghlan, pitrou, larry, python-dev, eric.snow, Olivier.Grisel
2013年12月15日 20:11:08sbtsetmessageid: <1387138268.34.0.239760945398.issue19946@psf.upfronthosting.co.za>
2013年12月15日 20:11:08sbtlinkissue19946 messages
2013年12月15日 20:11:08sbtcreate

AltStyle によって変換されたページ (->オリジナル) /