durusmail: quixote-users: Multiple interpreters? I didn't think so...
Multiple interpreters? I didn't think so...
2002-10-16
2002-10-16
2002-10-16
2002-10-16
Multiple interpreters? I didn't think so...
Titus Brown
2002-10-16
-> There's a pending patch from Titus Brown that might change this.  Hmmm,
-> on reflection I doubt Titus' patch will help you.  Have to go read it
-> again (and maybe check it in this time).

That would be nice ;).

It will not help with this problem; you'd have to change the get_publisher
function to return something other than _publisher.  In other words, fixing
this issue in mod_python would require two separate Quixote installations,
because get_publisher() cannot be overridden in subclasses.

My patches solve the analogous problem for get_request() by
referring get_request() to the publisher instance, thus allowing get_request()
to be redefined to return a thread-specific HTTPRequest object.

-> > So what would be the "right" way to handle two urls like this?
->
-> It's possible that you just can't do this with mod_python and Quixote.
-> You might want to consider SCGI, which puts your web application in a
-> completely different process -- one of the disadvantages of embedding
-> Python in the web server is that there's just not much separation
-> between the web server and your application.

I think you can do this in mod_python; see

        http://www.modpython.org/live/mod_python-2.7.8/doc-html/pyapi-
interps.html

You'll want to set up two different interpreters within the same server,
which (on cursory inspection) looks possible.

cheers,
--titus

reply