importing a module from a specific directory
yoav.goldberg at gmail.com
Sat Jul 21 19:00:27 CEST 2007
I'm using python for research related programming, and so I write many
experimental small pieces of code.
I would like to organize them into directory structure in
which there is a 'main' directory, and under it directories for
specific sub-tasks, or sub-experiments, I'm running (let's call them
'A', 'B', 'C').
I would like to have some common library code sit in 'main', and then use
it from scripts in the sub-tasks directories.
I also want the code in the sub-tasks to be quick-and-dirty fast to write,
so things like 'import sys; sys.append('..');' on the top of each script is
a bit awkward.
Is there a neat clean way of achieving the code organization?
How do you organize your code in such settings?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list