[mod_python] how to set environment for shell

Sells, Fred fred at adventistcare.org
Mon Nov 6 15:16:43 EST 2006

Note that I use Apache 2.x and python 2.3 and mod_python 3.1.3 on  linux.
Upgrading mod_python is possible if required.

I need to run fop.sh as a shell command.  It needs the environment variable
JAVA_HOME.  When I run fop.sh from the command line all is good,  when I run
the same command using os.popen("..../fop.sh ......") the JAVA_HOME
environment variable is not defined.

I even tried os.putenv("JAVA_HOME", '/usr/java/java') and it was still
undefined in the fop.sh.

Can someone point me in the right direction, so far I'm just going in

The information contained in this message may be privileged and / or
confidential and protected from disclosure. If the reader of this message is
not the intended recipient, you are hereby notified that any dissemination,
distribution or copying of this communication is strictly prohibited. If you
have received this communication in error, please notify the sender
immediately by replying to this message and deleting the material from any

More information about the Mod_python mailing list