H
Harry George
rony steelandt said:Imagine I have x projects and they all use util.py
What would be the best way to organise this
1.
c --\project1\*.py
|
|-\project2\*.py
|
--\globals\util.py
This organisation has the problem that if I have to modify something to
util.py that I need in project2, I'll have to retest project1 to make sure
it still works (that could be project 1..n).
2.
A copy of util.py in each project directory ? The advantage is that I can
modify each util.py in function of the need of the project but it looks
clutered, having n versions of util.py.
What is the best solution ? or is there another even better solution ?
Rony
Is "util.py" supposed to do the same thing wherever it is used? No
one can answer that for you. Your comments suggested mostly the same,
but some differences. In that is the case, then use one main util.py
for the common items, and do a local util.py for the locally-specific
items. Given proper attention to paths, there should be no confusion.
I wouldn't bury the common util.py in a package called "globals".
That could get really confusing. You might make it a standalone
package, or maybe use "utilities" or "common".