durusmail: quixote-users: Two questions re Quixote framework.
Two questions re Quixote framework.
2002-02-17
2002-02-18
2002-02-18
Two questions re Quixote framework.
Titus Brown
2002-02-17
Hi, folks,

I've just finished the hard part of an adapter to allow Quixote to run within
PyWX, a Python embedding for AOLserver that allows multi-threaded or
multi-interpreter handling of Web connections from within CPython.

I'll clean it up and publish it with the next release of PyWX (1.0b2, due
soon) but I had two questions for the friendly folk of the Quixote team.

First, right now Quixote seems to be fairly closely tied to the CGI
framework, in that it must have at least the PATH_INFO environment
variable (and probably others) defined; plus, there's some weird fCGI
interconnection that I haven't looked at.  Are there any plans to make
this tie more explicit, for example by no longer passing in os.environ as
a whole?   It would be great to not have to worry about complete CGI
environment emulation (which is both overhead and moderately complex), since
I get the impression that Quixote only cares about one or two variables.

Second, something very weird is happening with the Publisher initialization
in PyWX's multithreaded environment.  Rather than doing:

===
app = Publisher('quixote.demo')
===

I must instead do

===
import quixote.demo
app = Publisher(quixote.demo)
===

and

===
import quixote.demo
app = Publisher('quixote.demo')
===

will also work.  The first crashes my application with a malloc error,

=
#0  0x400e91d9 in chunk_alloc (ar_ptr=0x40389074, nb=1075435040)
    at malloc.c:2843
#1  0x400e9028 in __libc_malloc (bytes=348) at malloc.c:2811
#2  0x4024d97e in PyFrame_New (tstate=0x81e3578, code=0x8315b20,
    globals=0x83182f4, locals=0x0) at Objects/frameobject.c:149
...
=

that goes on for 462 different frames, which makes me suspect some kind
of recursion problem.  Do you have any suggestions for where to look to
figure out why this is happening?

thanks,
--titus


reply