[python-win32] ASP import strangeness

Mark Hammond mhammond@skippinet.com.au
Thu, 23 Jan 2003 22:46:50 +1100


> From command line python the following works:
>
>    from NutraNet.Templates import <module name>
>
> But from ASP it complains that it can't fine the module
> 'Templates'. I've looked
> at sys.modules from both enviroments and the ASP environment
> doesn't seem to
> pick up the nested module.

Not sure what you mean here.  For this to work, the parent directory of
"NutraNet" must be on sys.path - is this what you see under both
environments?

Try running:

import sys
print sys.path
import NutraNet
print NutraNet.__path__
import NutraNet.Templates
print NutraNet.Templates__path__

under both environments.

Mark.