[mod_python] How to define an environment variable for other python module to use?

Jack Moffitt jack at icecast.org
Sun Aug 13 18:37:05 EST 2000


generally when we do this with php, we define the ENV variables in the
apache startup script, so that they get into every child process.  then
they are readable with the normal environment functions.

we don't normally change where the oracle_sid is, so we have no need to
set them.

jack.

On Mon, 14 Aug 2000, David YEUNG wrote:

> I have other python modules which usually need to read some environment
> variables, e.g., an python-oracle interface module needs to read the "ORACLE_SID"
> to know where the database to connect. I used to defining this variable in the "shell"
> before invoking a python CGI program, e.g.:
> 
>    #!/bin/sh
>    export ORACLE_SID=orcl
>    exec /some/oracle/python/interface.cgi
> 
> I would like to try the mod_python using the default CGI handler, but does someone
> know how to define some environment variable in mod_python?
> 
> Thanks
> 
> david
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python
> 




More information about the Mod_python mailing list