Thanks everyone for their assistance. I have managed to achieve all that I set out to do: - separation between src and test folders - now successfully sharing code between projects - running unittest s and suites - avoiding namespace collisions
The solution involved the following (if anyone else is interested) - ammending all my __init__.py packages so that they included the following: from pkgutil import extend_path __path__ = extend_path(__path__, __name__) as per Peter Otten's suggestion - refactoring all the code so that the imports and froms conformed to the new package structure (a.b.c.common, a.b.c.app1 etc) and physically moving all the required files - ammending the PYTHONPATH so that the src and test directories for each project is included at the time of running ie PYTHONPATH=COMMON/src;COMMON/test;APP1/src;APP1/test;APP2/src;APP2/test Of course the /test entries are only required for testing and not runtime but you get the idea. I understand that flatter package structures are apparently the python way (http://dirtsimple.org/2004/12/python-is-not-java.html) but I like a nice little small little related package of functionality when I am l carving up a complex problem so I'm happy to incur any extra performance penalty in dict lookups. thanks again Todd -- http://mail.python.org/mailman/listinfo/python-list