Re: [Tutor] Adding to python path

Magnus Lycka magnus at thinkware.se
Tue Feb 24 11:19:32 EST 2004


> How could the scripts in the scripts/ folder use the modules of the lib/ folder 
> if they must be called as normal programs?

import sys
sys.path.append('../lib')

..methinks. Another option is to place the lib code in the
standard site-packages directory.
 
> Structure of my program:
> bego.py
> lib/
>      begohandler.py
>      mac.py
>      ...
>      syslogdb.py
> scripts/
>      matlab.py
>      ...
>      arrow.py


-- 
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/  mailto:magnus at thinkware.se



More information about the Tutor mailing list