I have a number of scripts with logical groups.
.
|_ database
| |_ db.txt
| |_ make_db.py
|
|_ accessory
| |_ util.py
|
|_ explore_one_way
| |_ script1.py
|
|_ explore_a_second_way
|_ script2.py
How do I access, say, util.py from script1.py? Is there another way than adding to sys.path or is that the most pythonic?
Update: This is relatively painless. I added __init__.py to the accessory directory and can then do:
import sys
sys.path.insert(0, '..')
from proj import util
or
from proj.util import some_symbol
Thanks to all.