Message127413
Nick, a more problematic issue is that __main__ is always called __main__, regardless of whether it is actually imported as the real "main module" or through a regular import. This means that it is impossible to discriminate between both uses by using "if __name__ == '__main__'", which in turn means that top-level code will always get executed as a side-effect of importing, which means the "__main__.py" feature is completely broken for use with multiprocessing under Windows!
This also shows, IMO, how uselessly complicated and misleading the import system has become. |
|
Date |
User |
Action |
Args |
2011-01-29 13:14:51 | pitrou | set | recipients:
+ pitrou, brett.cannon, georg.brandl, terry.reedy, ncoghlan, vstinner, jnoller, michael.foord, brian.curtin, asksol |
2011-01-29 13:14:51 | pitrou | set | messageid: <1296306891.07.0.543642257285.issue10845@psf.upfronthosting.co.za> |
2011-01-29 13:14:50 | pitrou | link | issue10845 messages |
2011-01-29 13:14:50 | pitrou | create | |
|