rony steelandt wrote: > 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). > Of course it does. And if you genuinely want to share components between projects, how else could you verify that utility changes for one project hadn't broken the other? > 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. > It will aslso give you probems if they get out of step, or if you want to make parallel changes in them all. I certainly wouldn't recommend this.
> What is the best solution ? or is there another even better solution ? > Seems to me that the best solution of all would be to have independent tests for the functionality defined in utils.py, and to run those tests after each change no matter for which project. regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC/Ltd http://www.holdenweb.com Skype: holdenweb http://holdenweb.blogspot.com Recent Ramblings http://del.icio.us/steve.holden -- http://mail.python.org/mailman/listinfo/python-list