[mod_python] importing a configuration module

Graham Dumpleton graham.dumpleton at gmail.com
Tue Aug 5 06:43:20 EDT 2008

2008/8/5 bharath venkatesh <bharathv6.project at gmail.com>:
> thanks for the help and link .. it was very helpful ..
> but how to do initializations in mod-python for example connecting to
> database etc ..
> and in that case how does apache imports standard python lib modules only
> once in the starting

See response to question about PythonImport. Just put your code at
global scope in the module. In other words, just like a normal module.
This is nothing special to mod_python, but a standard Python thing.


More information about the Mod_python mailing list