Help with a Python ASP C extension module ...
Eric Vasilik
eric at vasilik.com
Sat Mar 16 02:16:51 EST 2002
I am writing a C extension to Python. The reason I am writing an
extension is that I believe that the implementation of
Response.BinaryWrite() in the Window's ASP extension (I am using
Active State's Python 2.1) is not releasing the global interpreter
lock. I am getting very poor performace using it and I believe that
my server is not taking advantage of writing out multiple streams
because of the global lock.
Instead of writing out a response with:
Response.BinaryWrite( buffer( open( fileName, 'rb' ).read() ) )
I am now doing the following:
PythonExt.binaryWriteFile( Response, fileName )
The difference between these two is that the first calls the default
implementation of Response.BinaryWrite and the second calls an
extension I have written which reads the file and writes it out to
response, all while the interpreter lock is released.
My problem, is I cannot find any documentation on how to get a hold of
the IResponse object from the Python Response object. I need to get
it so that I may call BinaryWrite on without going back into the
Python interpreter.
I thought I would be able to find the source for the Response object
with the source from Active State, or the source from Mark Hammond's
win32All, but I found no references there. Any help would be
appreciated.
More information about the Python-list
mailing list