Newbie question about importing modules.

cronoklee cronoklee at gmail.com
Fri Dec 17 10:30:40 EST 2010


Hey thanks for the help fellas. The links were helpful and the pyExe program looks great. I might well end up using this.

I'm still a little confused as to how the directory structure works. PIL (http://www.pythonware.com/products/pil/#pil117), for example comes packed in a folder called Imaging-1.1.7 which contains a bunch of other directories, one of which is PIL. Now, what I've done is move this subfolder PIL into the same directory as my python test script and used:
from PIL import Image
I assume this instructs python to look in the PIL folder for Image.py. Am I wrong? I feel like I'm wrong. If I need to put the whole Imaging-1.1.7 folder somewhere else, how do I reference the specific Image module that I need?

Sorry for the stupidity - I'm coming from PHP where you just include path/to/script.php so this is a bit alien to me.

Thanks a lot,
cronoklee



More information about the Python-list mailing list