[Tutor] Lost Modules?
alan.gauld@bt.com
alan.gauld@bt.com
Mon, 26 Aug 2002 13:01:02 +0100
> I am at my wits end trying to learn Python. When I create a
> module ("mymod.py") and then try to
> import it, Python tells me it cannot find a module of that name.
Are you by any chance doing:
import mymod.py
???
If so change it to:
import mymod
Python adds the .py automagically.
Otherwise the likely explanation is a path issue and you
may need to modify sys.path or set the PYTHONPATH environment
variable. But my guess is the wrong import name as above...
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld