Caught this gem lurking on the Portage-dev mailing list. If you are doing a code audit of python code you would do well to follow
these tips (courtesty Brian Harring, ex-gentoo dev).

Sprinkle that with unittests, pymetrics and pychecker and you could have some fun spring cleaning your code.
(Note that Gentoo's python code isn't necessarily "pythonic" or simple.
PyMetrics reports the complexity of many of the functions at > 30 (complex/high-risk). Also some of these are gentooisms (ie tabs instead of spaces))
Add to:
delicious Diggtags: code python audit
links: digg this del.icio.us reddit