On Apr 4, 4:17 am, VR <[email protected]> wrote:
> Is anyone successfully using mod_http ?

As of rev 4112, the mod_http plugin works with Python 3.x.  Some more
work is needed with Python 2.x. I expect to have the code working for
Python 2.x soon.

Afaik, there was never any change made to Leo's core that affected the
code.  Rather, the problems were routine 2.6/3.x stuff: getting the
imports right and handling the bytes/string distinction to the
satisfaction of the base classes.

This was pleasant work: I got just a little bit familiar with
RequestHandler class, it is a subclass of leo_interface,
asynchat.async_chat and  SimpleHTTPRequestHandler, which makes this
slightly interesting.

Getting the code to compile was a bit challenging.  I finally trashed
the class escaped_StringIO class, a subclass of StringIO.  There were
problem initing the base class.  This is the kind of class that should
never exist anyway: I replaced it with calls to the global escape
function.

After the code compiled, I simply single-stepped through the code
until I found the source of the not-very-well reported complaints
about "buffer interfaces".  It didn't matter that the complaining code
was in the Python library...  As expected, the solution was to convert
various strings to bytes.  And that was that.

This shows how easy it is to fix bugs while knowing next to nothing
about the underlying code :-)  It's why I love Python.

Edward

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/leo-editor?hl=en.

Reply via email to