[mod_python] migrating to mod_wsg

Martijn Moeling martijn at xs4us.nu
Mon Mar 1 12:58:09 EST 2010

Lu/Ruben and others.

Some things I am working on...

I have set up a SourceForge project called "mptomwsgi" and it can be found on http://mptomwsgi.sourceforge.net
Please be patient, it has a CVS but no code uploaded yet.

I have to do some work on the Session.Py since I forgot to mention I use SQLAclhemy and my mptomwsgi version is using that.
The nice thing about SQLAlchemy (Database to Object mapper) is that it works on any Python DBAPI compatibe database. I have a MySQL Session object added to the original version too but that one is dependent on MP for now, I have to merge the two.

At this point I have a seemingly good working Req object, with support for register_cleanup.
I have no real Python package yet, and this adapter CANNOT be installed when Mod_Python is on the system since you will have to copy the files to the: python/site-packages/mod_python directory (for code compatibility)

you will get a sample index.wsgi and there you will have to do: import your_original_module_with_handler as app.

Can you (Lu/Ruben) send me a message with what parts of MP you use and what OS you are on so I can work out what I have to do to help you with reasonable documentation?
Some hints:
stuff from mod_python.util like fieldstorage (which might just work, I just do not know at the moment)
Are you using SQLAlchemy?

Be aware that I do not have looked into publisher (never ever used it), I have to bother Graham with that but for now I will not support that.

Updates will follow soon!


On Mar 1, 2010, at 10:18 AM, Lu wrote:

> Great!
> Thanks for your time,
> luca
> On Mon, Mar 1, 2010 at 12:29 AM, Martijn Moeling <martijn at xs4us.nu> wrote:
> Please give me some time to build instructions and a zip file, I'm extremely busy until next wednesday, I hope i can find the time to get it done in between!
> On Feb 25, 2010, at 12:08 PM, Lu wrote:
>> I have written an adapter for mod_wsgi which is code compatible for Mod_python programs.
>> My mod_python CMS runs now on top of mod_wsgi without any changes to the code.
>> It is really small and consists of one index.wsgi to created the req object and call the handler and a "fake" python package for the apache.py, Session.Py, Cookie.py etc. (I did need to change some stuff in there)
>> I did this for my own use since I like the Req object and to pass it around, so my code is very dependent on MP. I have completely turned over Session.Py for my own session management which stores in MySQL and has License stuff etc.
>> I consider it Beta since I am the only one running it and do not touch all the code.
>> This code is free to use by anybody (Be aware it should be GPL or so). At the moment there is no CVS or License simply because I do not have the time to set stuff like that up (never did that before). I just started coding Python with Eclipse and Pydev as preparation on starting CVS use.
>> Drop me an email if u r interested I'll help you out using email/MSN Messenger/Skype etc
>> Hi Martijn,
>> I'm interested in your code, can you please sent to me a copy ?
>> thanks,
>> luca

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20100301/fed92cee/attachment.html

More information about the Mod_python mailing list