Experimental Python Documentation

Over the last few weeks Georg Brandl from the pocoo team worked on an ass kicking building system that generates reStructuredText files out of the original python LaTeX sources. I helped him a bit with the web part and the result is a nifty WSGI application and offline documentation in .html format that does everything what the current docs do, just better :-)

The sources as rst have some real advantages. First of all the whole build system is written in python. Thus it’s a lot easier to have a platform independent build system (what we now have) and write a web documentation interface with patch functionality (editing the sources and sending a patch to the python documentation mailinglist right from the web interface, with preview). The web application also has comments that a user can attach to any page that was generated from rst sources.

Also the web version of the documentation knows about keywords (unique references). So you can jump to os.path.exists without any clicking. Just go to /os.path.exists (or enter the keyword in the quicksearch box) and you will be redirected to the page that documents that function. It also provides a fuzzy search, similar to the php documentation. If you type a function wrong or don’t know the name of the module where it’s in it will present you a list of up to 20 possible results.

We don’t know if it will really replace the current python documentation but the first responses in the thread on python-dev sound positive. You can try out the interactive, online version at pydoc.gbrandl.de:3000.

If you have suggestions, ideas etc. feel free to join the discussion in the thread above or post your comments here.

Leave a Reply

cogitations driven by wordpress