
Feb. 27, 2010
3:27 p.m.
Glenn Linderman wrote:
But if the technique can work from the command line, it seems the same technique could be re-used in the importer.
Not really - we only get away with the fun and games at execution time because __main__ is a bit special (and always has been). Those tricks would be a lot harder to pull off for a normal module import (if they were possible at all - I'm not sure they would be). Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia ---------------------------------------------------------------