[Tutor] How can I add my folder to pythonpath?

Emily Fortuna emily.fortuna at nist.gov
Mon Jun 26 14:33:26 CEST 2006


> That is close but not quite right. The correct import will be
> from mymodules import mymodule1
> 
> Kent

My apologies for misleading instructions.
Emily

> 
>>
>>
>> Laszlo Antal wrote:
>>> Hi,
>>>
>>> This is how my directory looks
>>> myprogram    (this is the main folder for my program)
>>> |
>>>   myprogram.py
>>>   mymodules  (this is where I store my modules)
>>>       |
>>>         mymodule1.py
>>>         mymodule2.py
>>>
>>> I would like to import from mymodules folder my modules1.py, 
>>> mymodules2.py into myprogram.py.
>>>
>>> How can I add mymodules folder to pythonpath
>>> from myprogram.py.?
>>> So if I copy myprogram folder into an other pc than   myprogram.py can 
>>> take care of adding mymodules folder to pythonpath.
>>>
>>> Thank you in advance
>>> Laszlo Antal
>>> _______________________________________________
>>> Tutor maillist  -  Tutor at python.org
>>> http://mail.python.org/mailman/listinfo/tutor
>>>
>>>
>> _______________________________________________
>> Tutor maillist  -  Tutor at python.org
>> http://mail.python.org/mailman/listinfo/tutor
>>
>>
> 
> 
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
> 
> 



More information about the Tutor mailing list