configuring mxCGIPython
Mark McEahern
marklists at mceahern.com
Thu Apr 25 09:23:16 EDT 2002
[Paul Boddie]
> I found that it isn't always possible to deploy Python programs in a
> cgi-bin directory and to use the above notation to persuade the
> operating system to locate the Python executable. In the end, I used a
> wrapper shell script for each of my Python programs.
Here's the wrapper shell script I'm using. I'd be very interested in any
feedback, suggestions you might have:
#!/bin/bash
echo content-type: text/plain
echo
echo Trying to capture the stderr of cgipython
if [ -f cgipython ]
then
echo cgipython exists
# Trying to send stderr to stdout.
./cgipython test.py 2>&1
else
echo cgipython does not exist
fi
test.py, fwiw, is simply:
import sys
print sys.version
When I run this, I get:
Trying to capture the stderr of cgipython
cgipython exists
./cgipython: error in loading shared libraries: libxmlparse.so.1: cannot
open shared object file: No such file or directory
I'm not sure yet what that means yet, but I think it means I may be able to
set LD_LIBRARY_PATH, if: 1) that file resides on the server; and 2) I know
where it is.
Is there a way I can tell cgipython not to bother loading that particular
shared object?
Thanks,
// mark
More information about the Python-list
mailing list