Thanks for the help.
I hadn't used collective.recipe, however, was able to use info from mod_wsgi
thread for mod_python.
I was also using virtualenv, which is now more elegantly loaded using
helloworld_mod_python.py.
For future reference, this is what it looks like for me:
*.htaccess
*<snip>
SetHandler python-program
PythonHandler helloworld_mod_python
PythonOption paste.ini /home/username/dev/helloworld/config_merged.ini
PythonPath "[ '/home/username/dev/helloworld' ] + sys.path"
</snip>
*helloworld_mod_python.py*
import os, sys
pcwd = os.path.dirname(__file__)
activate_this = '%s/../env/bin/activate_this.py'%pcwd
execfile(activate_this, dict(__file__=activate_this))
from paste.script.util.logging_config import fileConfig
fileConfig('%s/config_merged.ini' % pcwd)
from paste.deploy import loadapp
application = loadapp('config:%s/config_merged.ini' % pcwd)
from paste.modpython import handler
Before doing the above, I had set it up directly using paste.modpython in
.htaccess.
DD.
On Wed, Dec 9, 2009 at 12:45 AM, Wichert Akkerman <[email protected]> wrote:
> On 2009-12-8 23:20, Graham Dumpleton wrote:
> > Paste server does special stuff to initialise the environment for
> > logging. Arguably it shouldn't do this and any such initialisation
> > should be a side effect of getting the root WSGI application object.
> >
> > What it means is that you have to perform the same initialisation
> > somehow when using mod_python.
> >
> > For discussion of how to do that for mod_wsgi see:
> >
> >
> http://groups.google.com/group/pylons-discuss/browse_thread/thread/9b9add4529b3779c
> >
> > You will have to work out how to do the same for mod_python.
>
> The collective.recipe.modwsgi recipe for buildout does that for you.
>
> Wichert.
>
> --
> Wichert Akkerman <[email protected]> It is simple to make things.
> http://www.wiggy.net/ It is hard to make things simple.
>
> --
>
> You received this message because you are subscribed to the Google Groups
> "pylons-discuss" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<pylons-discuss%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/pylons-discuss?hl=en.
>
>
>
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en.