Trying to use "Programming Python" (Lutz), getting module errors.
Rob Lineberger
robline at purdue.edu
Mon May 6 01:34:20 EDT 2002
I'm trying to learn Python, so I picked up Mark Lutz' Programming
Python. Using latest builds of Python and Pythonwin.
print 'Hello world!' worked ok.
As soon as I move on to page 13, Running Module Files, it breaks. I
opened up notepad and created a file called spam.py. When I try to
use it, pythonwin says no such module exists. I saved it in My
Documents, but I have no idea how to tell Python to look there. So I
saved it to C:\Python22\Lib\spam.py. No dice.
Tried using spam.py from the command prompt, IDLE, etc, all to no
avail.
Tried setting PYTHONPATH to C:\Python22\Lib but that didn't work
either.
I can't learn this language if I can't create and import modules. Any
advice?
More information about the Python-list
mailing list