[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?
$ cat ~/.bashrc
Hi bob,
1. decide the directory which will be your root folder containing foo
[/home/ROOT/foo/]
2. work out your directory structure relative to this root folder
here it is -ROOT-foo-car.py
-bar-far.py
-bar-jar.py
3. add
vaibhav wrote:
4. add the root folder to your sys.path
so your jar.py file should have the following entries
from sys import path
path.append('../../../ROOT')
note: i prefer relative paths
Interesting that that works. I guess you could create
a limited form of Zope acquisition type
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
[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