I would like to see an example of custom importer, it would help me understand the problem that needs to be solved.
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.

