importing a module from a specific directory
Yoav Goldberg
yoav.goldberg at gmail.com
Sat Jul 21 13:00:27 EDT 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?
Thanks,
Yoav
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070721/5b8f926f/attachment.html>
More information about the Python-list
mailing list