Message206252
> 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? |
|
Date |
User |
Action |
Args |
2013-12-15 20:11:08 | sbt | set | recipients:
+ sbt, brett.cannon, ncoghlan, pitrou, larry, python-dev, eric.snow, Olivier.Grisel |
2013-12-15 20:11:08 | sbt | set | messageid: <1387138268.34.0.239760945398.issue19946@psf.upfronthosting.co.za> |
2013-12-15 20:11:08 | sbt | link | issue19946 messages |
2013-12-15 20:11:08 | sbt | create | |
|