[medusa] default_with_post_handler

Sam Rushing rushing@n...
Fri, 13 Jul 2001 01:04:29 -0700


max@a... wrote:

> So I looked to default_handler.py to find a POST example, and sure
> enough:
>
> # support for handling POST requests is available in the derived
> # class <default_with_post_handler>, defined below.
>
> But ...
>
> emf@s...:/usr/local/lib/python2.0/site-packages/medusa% grep
> default_with_post_handler *.py
> default_handler.py:# class <default_with_post_handler>, defined below.

Ahh... an outdated comment.
I would recommend looking at the post-handling capabilities of the
'script_handler' class in script_handler.py, there should be enough info
there to help. You might event want to use one of the script-handling
classes, since they support what most folks would want to do with a
medusa-based web server.

> That's the only reference to that class I can find anywhere. Where is
> this class?
>
> As a parting comment, I find asyncore/asynchat/Medusa very powerful
> and very convenient, but I haven't really been able to find any
> documentation beyond sketchy READMEs and tutorials. Even something
> along the lines of HappyDoc-generated API documentation based solely
> on the class hierarchy, the methods in classes, and the docstrings
> that appear here and there would be helpful. Does any exist
> somewhere?

That's interesting, I've just been discussing the lack of documentation with
someone else. IMHO when the code is short, it should serve as the
documentation. It's less likely to be misleading, and much more likely to
be written. So one of my most important goals when writing code is to keep
it short enough to not require documentation. 8^)

For me, the most important part of a library are the examples. Tons of
documentation can actually be a hindrance without short examples to get you
started. Anyway, enough weak excuses for my lack of motivation to
document... [Of course, none of this excuses the lack of proper doc
strings...]

-Sam