[mod_python] How to make mod_python (Win32) not to rely onregistrykey?

Nicolas Lehuen nicolas at lehuen.com
Tue Jun 27 11:16:11 EDT 2006

I'm not sure this is a mod_python problem, rather a Python problem.
There is a "Movable Python" project which is precisely what you may
want : a Python distribution that doesn't need to be installed.
Apparently the server is down right now, but you'll find it here :


Anyway, let me get things clear : what you would like is to be able to
specify relative paths in the PythonPath directive, right ? So it's
not related anymore with the need to set environment variable.

Have you just tried to use the PythonPath directive, and NOT the
environment variable, providing it absolute paths for a starter ? We
must first check whether the PythonPath directive solves the problem
if provided with absolute paths, before trying to patch it to accept
relative paths.


2006/6/27, sanja at bougakov.com <sanja at bougakov.com>:
> It doesn't seem to be the perfect option - it will keep ugly DOS window
> open all the time Apache works.
> Maybe someone will suggest how to patch mod_python sources to specify
> PYTHONPATH relative to the location of mod_python.dll?
> Yours,
> Sanja
> > I think that's the way to go, because it looks like Python doesn't
> > like the environment variables set by Apache. I need to investigate
> > more, but your solution, John, is a sure bet.
> >
> > Regards,
> > Nicolas
> >
> > 2006/6/27, John Keyes <john.keyes at secantus.com>:
> >> I think he can still do it if he launches apache from a batch
> >> file.  Inside this batch file set the PYTHON_HOME.  This
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list