Module executed twice when imported!

Michael Abbott michael at araneidae.co.uk.invalid
Fri Jun 30 17:25:00 EDT 2006


In article <e844h9$qkt$1 at news.albasani.net>,
 Georg Brandl <g.brandl-nospam at gmx.net> wrote:
> That's because __name__ is normally set to the module's name in the package
> hierarchy. When you set it to "some1.some2", Python thinks it's
> in a subpackage

Ahhhh.

So what I *should* have set it to is the module name *without* 
extension, i.e. __name__='imptest'

Thank you.  Now I think I understand it.



More information about the Python-list mailing list