[EMAIL PROTECTED] wrote:

>hello,
>
>i have a problem.  i would like to import python files above and below
>my current directory.
>
>i'm working on /home/foo/bar/jar.py
>
>i would like to import /home/foo/car.py and
>                       /home/foo/bar/far.py
>
>how can i do this?
>
>thank you,
>bob
>
>ps: i want to scale, so i do not want to edit the python path
>
>  
>
Work out the path name for the directory from which you'd like to 
import, and append it to sys.path:

import sys
sys.path.append('..')
sys.path.append('whatever/path/absolute/or/relative')

Then off you go importing as you wish.

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

Reply via email to