[mod_python] How to make mod_python (Win32) not to relyonregistrykey?

Nicolas Lehuen nicolas at lehuen.com
Wed Jun 28 01:23:58 EDT 2006


And that, my friend, is what we call an installer :).

See Inno Setup et al. But I don't think this is what Sanja wants.

Is the SetEnv directive correctly working on Win32 ? For example, if I
have a CGI program, does it effectively receive the environment
variables set in the .conf file ? If so, I don't understand why Python
is more cooperative...

Regards,
Nicolas

2006/6/28, Lee Brown <administrator at leebrown.org>:
> Greetings!
>
> BINGO!  This is a PYTHON problem, and I doubt that you'll solve it without
> patching python's source code.
>
> However, I have seen a python module that manipulates Windows Registry data.
> I suspect that your most expedient solution will be to write a small program
> to add the needed information to the registry, convert that program to an
> EXE file, and then execute that from a batch file when you plug your 'usb
> based' server into the host machine.
>
>
> Best Regards,
> Lee E. Brown
> (administrator at leebrown.org)
>
> -----Original Message-----
> From: mod_python-bounces at modpython.org
> [mailto:mod_python-bounces at modpython.org] On Behalf Of Nicolas Lehuen
> Sent: Tuesday, June 27, 2006 11:16 AM
> To: sanja at bougakov.com
> Cc: mod_python at modpython.org
> Subject: Re: [mod_python] How to make mod_python (Win32) not to
> relyonregistrykey?
>
> 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 :
>
> http://www.voidspace.org.uk/python/movpy/
>
> 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.
>
> Regards,
> Nicolas
>
> 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
> >
> _______________________________________________
> 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