Importing modules for cgi's

Daniel dlNONNSPAMrubin at yahoo.com
Thu Dec 20 01:17:21 EST 2001


Hi,
I installed a database api module in python and added the path to my
PYTHONPATH. In order for my cgi to work, though, I have to invoke my cgi
from a shell script that first sets the PYTHONPATH so the module will be
foud when the cgi runs. Is there a simpler way? I'd prefer not having to
have the shell script. Is there a way for python to always know about my
module without using PYTHONPATH?

Another thing I tried that doesn't work is modifying sys.path at the
start of the cgi script. It seems that this has to be set (via the shell
script) before the cgi script starts.

Thanks,
Daniel




More information about the Python-list mailing list