exec'ing an import
Grant Griffin
not.this at seebelow.org
Sat Dec 9 07:09:10 EST 2000
Martin von Loewis wrote:
>
> Grant Griffin <not.this at seebelow.org> writes:
>
> > Does anybody have an explanation?
>
> Perhaps script.py is not on sys.path, so import won't find it.
Well, I had thought that too, so I went through a lot of path-related
contortions (even going so far as to explicitly include the absolute
path in the exec'd import statement), but that wasn't it.
The thing that cured it was executing "python script.py" rather than
just "script"; the script itself was unchanged.
=g2
--
_____________________________________________________________________
Grant R. Griffin g2 at dspguru.com
Publisher of dspGuru http://www.dspguru.com
Iowegian International Corporation http://www.iowegian.com
More information about the Python-list
mailing list