CGI extension problem

Robin Becker robin at
Sat Apr 1 01:13:19 CEST 2000

I don't have root privilege, my python cgi script needs access to an extension which I have
built; the extension in turn needs a shared lib which I have built. I install in a directory say
$HOME/lib. When I run the cgi script I need to set the LD_LIBRARY_PATH to at least include
$HOME/lib. I have use the following idiom

import sys, os
if sys.platform != 'win32' and not os.environ.has_key('LD_LIBRARY_PATH'):
        os.environ['LD_LIBRARY_PATH'] = HOME_LIB

# rest of cgi script

I can think of a few ways in which this might break, but is there anything obviously easier less
Robin Becker

More information about the Python-list mailing list