[Tutor] adding a new folder to Python's importable modules search path

tpc247 at gmail.com tpc247 at gmail.com
Mon Nov 26 06:00:24 CET 2007


On 11/25/07, Kent Johnson <kent37 at tds.net> wrote:
>
>
>
> Should be sys.path.append(...)
>
> Kent



yes, I'm sorry, in my posting I did have a  typographical error, but my code
has the following seemingly correct lines:

            sys.path.append(PATH_TO_MODULE)
            print "Path added: ", PATH_TO_MODULE

so when I run my script from the command line, the folder does seem to be
added to Python's importable modules search path.  When I attempt to import
my_module I get the error:

ImportError: No module named my_module
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20071125/9c5bd14e/attachment.htm 


More information about the Tutor mailing list