[mod_python] mod_python adapter for mod_wsgi in the make

Graham Dumpleton graham.dumpleton at gmail.com
Thu Nov 26 05:48:08 EST 2009


2009/11/26 Martijn Moeling <martijn at xs4us.nu>:
> Graham,
>
> Thank you for the info.
>
> I might very well use the SWIG bindings, I'll have a closer look at it.
> MP coders might be happy with just embedded mode...

If you go that way let me know as obviously will need to give guidance
and I know some things aren't quite working at present and so they
will need to be fixed up.

There is also a new feature in mod_wsgi which may make this stuff
easier to use for what you are doing and also looking ant further
changes for mod_wsgi 4.0 which may make it even more streamlined as
far as adding a personality layer over the top of normal WSGI layer.

As I have sort of planned all along, then if there is enough interest
in the raw Apache API access, then will introduce a first class
content handler for that raw API rather than having to use it
indirectly via the WSGI layer.

Graham

> Anyhow, I'll keep things updated on the MP mailing list for now.
>
> Martijn
>
>
> On Nov 26, 2009, at 5:18 AM, Graham Dumpleton wrote:
>
>> I have moved it to:
>>
>>  http://bitbucket.org/grahamdumpleton/apswigpy/
>>
>> I'll add some basic documentation on building and usage.
>>
>> Graham
>>
>> 2009/11/26 Graham Dumpleton <graham.dumpleton at gmail.com>:
>>> 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