Importing MySQLdb/Changing Paths at run-time

Mundeep mund33p at yahoo.com.au
Sat Sep 29 00:17:37 EDT 2001


Sam Penrose <sam at ddmweb.com> wrote in message news:<mailman.1001711011.32097.python-list at python.org>...
> import sys
> sys.path.append('whatever')
> 
that doesnt't seem to work either.
I tried instead moving the MySQLdb module to the cgi-bin directory and
it now seems to find it but gives me the following error:
Import error ld.so.1: /usr/local/bin/python: fatal: libz.so.1: open
failed: No such file or directory

Anyone know what this means?

> always works for me. I'm not sure why the near-equivalent isn't working
> for you.
> 
> You can also set the PYTHONPATH environment variable for the cgi user
> though it sounds like this may be unworkable in your situtation. Our
> httpd.conf files have a line that reads:
> 
> SetEnv PYTHONPATH /home/httpd/shared/cgi-bin

Unfortunately dont have access to modify any webserver settings.

Cheers,
Mundeep



More information about the Python-list mailing list