I think I see it what you're trying to accomplish, but I'm trying to clarify now - you're looking for separate copies of the modules inside each applications modules directory, but the ability to import with an absolute import without having to specify the applications.appname.modules part?
On Apr 6, 11:46 am, pierreth <[email protected]> wrote: > On 6 avr, 12:26, Mathew Grabau <[email protected]> wrote: > > > I totally agree with that. Though, I just read up, if pierreth is > > trying to borrow code from app1/modules inside app2/controllers, then > > injecting app1/modules into the python path should work. Of course, > > this would just avoid having to put the module code inside app2/ > > modules (and would provide the ability inside the app2 controller to > > use "import moudleA"). > > I want to share code in my applications but I want my applications to > be self-contain too. So I use "modules" and not "site-packages". The > only problem is that absolute import statements will not import > modules in "modules". It is not the Python path. > > If this becomes a real problem. I'll write a custom Python importer. > It is not hard to do.

