Erratic import behavior

Alex Martelli aleax at aleax.it
Sat Mar 22 04:15:11 EST 2003


Jon wrote:
   ...
> What I would like to know is why is there a difference in behavior
> between running my code in PythonWin and running it from the command
> prompt?

Not sure, offhand, but, try importing sys and printing sys.path --
does it differ in the two cases?  That might easily explain import
differences.  If it's not that, seeing if PythonWin has import
hooks installed, including possibly just an override of __import__
in the builtins, might help.


Alex





More information about the Python-list mailing list