module name not recognized

Darren Dale dd55 at
Sun Oct 10 20:09:06 CEST 2004

Robert Kern wrote:

> Darren Dale wrote:
>> # trying /home/darren/temp/simCTR/
>> # trying /home/darren/temp/simCTR/
>> # trying /home/darren/temp/simCTR/
>> # trying /home/darren/temp/simCTR/fresnel.pyc
>> Traceback (most recent call last):
>>   File "", line 7, in ?
>>     from simCTR.fresnel import *
>> ImportError: No module named fresnel
> Don't execute python from /home/darren/temp .

I see. I had two problems. I didnt realize there was an old simCTR directory
in ~/temp. Python was searching this directory, and when it didnt find the
module it raised an error. I read that python would try the current
directory first, and if that failed it would try other places along the
python search path. The caveat is that if python finds a package but not
the module, it will not continue the search. Thank you everyone, especially
Robert and Alan.

More information about the Python-list mailing list