durusmail: quixote-users: using compile_package rather than enable_ptl
Ubuntu "Jaunty" Quixote package broken
2009-05-18
Ian Forbes
2009-05-18
Robert Ladyman
2009-05-18
Ian Forbes
2009-05-18
Michael Watkins
2009-05-19
Robert Ladyman
2009-05-19
Ian Forbes
2009-05-19
Michael Watkins
2009-05-20
Mike Orr
2009-05-19
Mike Orr
2009-05-19
Michael Watkins
using compile_package rather than enable_ptl
2009-05-19
Michael Watkins
2009-05-19
Robert Ladyman
2009-05-19
Michael Watkins
2009-05-19
Robert Ladyman
using compile_package rather than enable_ptl
Michael Watkins
On Tue, May 19, 2009 8:31 am, Michael Watkins wrote:
> Test app:
> $ curl -I http://localhost:8080/
> HTTP/1.0 200 OK

Sorry, in my quest to be helpful I forgot to mention one thing: I swapped
out the enable_ptl hook in the demo package's __init__ for:

# enable_ptl()
from quixote.ptl import compile_package
compile_package(__path__)

And reinstalled the Quixote package to include the revised demo sub-package.

sudo python2.6 quixote/server/simple_server.py --factory
quixote.demo.create_publisher

For the quixote.demo package you'll need to run or import the application
package as root at least once, unless you move the demo dir to somewhere
else in your Python path that you or your "web" user can write to.

QP avoids import hooks with a similar approach and in practice I find it
works very well / doesn't get in the way at all.


reply