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   |   ncogh...@gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to