I have a python script (part of a django application, if it makes any
difference) which is exhibiting the following behaviour:

import my_module # succeeds
imp.find_module("my_module") # fails, raising ImportError

which is completely baffling me. According to sys.path, both should
fail; the directory containing my_module is not in sys.path (though
the my_module directory itself is). More puzzlingly, printing out
my_module.__file__ gives:

/home/tow/test/my_module/../my_module/__init__.pyc

I don't really understand what the ".." is doing in there.

Can someone explain what I'm missing here, it's got me stumped.

Toby
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to