[mod_python] Articles on module importing.

dharana dharana at dharana.net
Fri Jul 8 10:39:19 EDT 2005

Nick wrote:
> If I read this right (and please verify that I am understanding this 
> correctly as well), that import_module doesn't/wouldn't support 
> importing packages that just use the stock Python import mechanism.  It 
> could be possible to call import_module in the __init__.py and in all 
> the submodules to refer to any modules in the package, but that is left 
> to the programmer.
> Otherwise, you could import packages normally, just not supporting 
> reloading.

Oh, ok. I feel better now. But I think I should comment that then, for me, the 
new mechanism  won't make a difference in the "apachectl restart" routine. I 
will continue to do restart apache if the new mechanism doesn't supports 
packages. I've abstracted a lot of things in my custom handler/webapp so the 
only thing I'm changing nowadays are inside packages (99% of the time).

> Nick
> dharana wrote:
>> Graham Dumpleton wrote:
>>> It is all feasible, except for Python packages which may just not be 
>>> worth
>>> the effort. I know it is feasible, because for how you are using 
>>> things, it
>>> is already possible and working in "vampire::publisher". ;-)
>> I'm a bit lost with the details of the implementation, but a 
>> reocurring fear that strikes me while reading some of the emails is: 
>> "packages not supported". Could you clarify if with the new method you 
>> won't be able to import packages or if you won't be able to 
>> automatically reload modified modules inside packages?
>> Thanks,


More information about the Mod_python mailing list