[mod_python] mod_python adapter for mod_wsgi in the make

Graham Dumpleton graham.dumpleton at gmail.com
Wed Nov 25 19:37:44 EST 2009


FWIW, happy to move that ap_swig_py out to my bitbucket space if
others want to help progress it as a basis for mod_python like more
integrated interface into Apache internals.

Graham

2009/11/26 Graham Dumpleton <graham.dumpleton at gmail.com>:
> Hmmm, did I ever point you to my SWIG bindings for Apache C API.
>
>  http://code.google.com/p/modwsgi/source/browse/#svn/sandbox/ap_swig_py
>
> I stopped work on it because no one was interested, but gives you more
> direct access to Apache request_rec object plus all the native Apache
> APIs which mod_python has a tendency to want to use at lowest levels.
>
> It can only be used in mod_wsgi embedded mode though, not daemon mode.
>
> To use you need to also set:
>
>  WSGIPassApacheRequest On
>
> in Apache configuration.
>
> It is been a long time since I played with it, but from memory can do
> things like:
>
>  from apache.httpd import *
>
>  def application(environ, start_response):
>    r = request_rec(environ['apache.request_rec'])
>
>    ap_internal_redirect('/some/other/path', r)
>
>    # Dummy WSGI response as redirect already sent response.
>    start_response('200 OK', [])
>    return []
>
> The request_rec is already going to give you a requets object like
> mod_python, although actually closer to original Apache one than
> mod_python.
>
> Graham
>
> 2009/11/25 Martijn Moeling <martijn at xs4us.nu>:
>> Hi all you mod_python fans!
>>
>> Since I am developing a python web-os (with browser based desktop) which
>> is heavily dependant on mod_python I am not very happy to see the
>> development stop of MP.
>>
>> Since MOD_WSGI is the alternative I know for a while now I have to move.
>> In my case this seems possible to crate a "fake" MOD_PYTHON module which
>> communicates with MOD_WSGI and runs the application.
>>
>> Up to now I have had some success but there is still some work to do
>> around apache.py but it all seems possible. That said, I do not use the
>> Publisher handler and I might not be able to implement that part or I
>> might need help
>>
>> I will put this out under the same license conditions as MP and since I
>> am close to releasing the first beta I am starting to get curious about
>> interest, If I have to put up a new project on some google or
>> sourceforge server etc.
>>
>> As far as I can see there are no real problems (it might with input and
>> output filters, nut sure yet) and there are still some parameters for
>> the Request Object to be filled in. My OS (app) seems to start working,
>> even stuff like my own build webdav server.
>>
>> So If anyone has interesting comments to make, shoot
>>
>> The 'beta' name for the project is "mod_Python adapter for mod_wsgi"
>> Anyone who comes up with something better gets a free copy :-)
>>
>> Martijn Moeling
>>
>> _______________________________________________
>> Mod_python mailing list
>> Mod_python at modpython.org
>> http://mailman.modpython.org/mailman/listinfo/mod_python
>>
>



More information about the Mod_python mailing list