[mod_python] PythonImport

bfordham at piratech.net bfordham at piratech.net
Fri Aug 11 16:07:15 EST 2000


-----BEGIN PGP SIGNED MESSAGE-----

On 11 Aug 2000, at 21:29, Daniel Mikkelsen wrote:

> Hi.
> 
> I'm having problems with loading modules not located in the global
> site-packages directory. 

I tried a couple of quick tests.  First I created a module (yoda.py)
with one line (x=1) and put it in the directory with my main script. 
Told the main script to import it and print yoda.x; worked fine.

Moved yoda.py to directory blah, and added:
PythonPath "sys.path+['/serverpath','/serverpath/blah']
to my httpd.conf file.  Restarted the server, it worked, too.

I'm running Debian 2.1, Apache 1.3.12 and mod_python as a DSO.

Are you sure the script to want imported is in a directory the server
can read?  Did you restart the server?

Sorry I can't be of more help

- --B

-----BEGIN PGP SIGNATURE-----
Version: N/A

iQCVAwUBOZRctw2B1TBOdblFAQE+6AP5AVcFKkk8lwXZg8aXrpIUFJ29dJ+es3zy
LA0uHhKr1GVP0MoGuU/K6ovw9jU+mQG/XweirNn1ZjcCj5tAbxx26V9d15fF5Llx
z2aklem04SOExXNcXsM4DWCm/Rpe4O79TEdrPB//ZcdBmoBXgPbEbZ8R033y54Hy
thKrNKNZcM0=
=U2pW
-----END PGP SIGNATURE-----




More information about the Mod_python mailing list