Wednesday, January 28, 2015

Scratching an itch: improving pydoc

Pydoc is great - no make that fantastic.  However, I was never fond of the look of help pages displayed when pydoc is used in webserver mode.    Pydoc uses hard-coded styling options (including font and colors) based on deprecated html 4 syntax.

I decided to see if I could make it more customizable and, after a half-day coding sprint, I offer you mod_pydoc, which is somewhat more easily customizable using css.  The new version has a simplified styling as default.

mod_pydoc is only available from github (for now); I'm hoping that people with better designing skills will contribute some code to make the output look better than my feeble attempt.  Eventually, my intention would be to file a feature request to python.org and submit it as a possible improvement on the current module.

2 comments:

Bob Kline said...

You might mention that your version doesn't work with Python 2.x (unless I'm missing something).

André said...

@Bob Cline: you are correct. However, improvements to modules in the standard library would almost certainly not be accepted for Python 2.x - For this reason, any work I do is (implicitly) focused on Python 3.