[mod_python] Introducing AnalyzeThat!

Nick nick at dd.revealed.net
Tue Aug 17 13:17:39 EDT 2004


Very nifty and pretty.  For the pathetically lazy (like myself) I often call 
pydoc.html.document(object) or pydoc.text.document(object) when debugging. 
Not as complete and pretty as what Amir has written, though, and it doesn't 
introspect objects.  And the html links won't work of course, but the text 
version can be handy in logs.

Nick

Amir Salihefendic wrote:

> I was pretty tired of the way that you test out stuff in mod_python. 
> I.e. you use req.write(variable), req.write(dir(object)) etc.
> 
> Therefor I sat down - and thought of a good way to analyze stuff.
> I thought, let's make it this way:
> - Throw anything in - abracadabra - you get some informative output - 
> that also is readable.
> And some hours later I have class AnalyzeThat :-)
> 
> Throw anything in AnalyzeThat and it generates some informative and 
> readable output.
> Following types are supported (i.e. there are written explicit handlers 
> for them):
> Int, Str, Tuple, List, Dict, Module and Function. I had also support for 
> boolean (but it does not work in Python 2.2, so I removed it again).
> Other types are also supported - they just don't have their own handlers.
> 
> For a better overview check out:
> http://amix.dk/at/index.py
> 
> If anybody has any additions I would be very glad to implement them - - 
> in the final version of the class.
> 
> Kind regards
> Amir Salihefendic
> -----
> What we do in life echoes in eternity
> 
> _______________________________________________
> 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