github.com/hoffmann Peter Hoffmann on Stackoverflow @peterhoffmann on twitter Peter Hoffmann on Facebook Contact me per email Subscribe to Atom Feed

Peter Hoffmann

Software Engineer
prev page next page

quick-and-dirty literate programming

Posted on October 14, 2010
#python

I just stumbled upon docco, the quick-and-dirty, hundred-line-long, literate-programming-style documentation generator. I really like the concept of having the documentation on the left side and the implementation code on the right side.

The following example is an implementation of the gnome sort algorithm in python:

There are ports to other languages as well:

  • rocco written in ruby
  • shocco written in shell script
  • pycco written in python, currently supports python, coffee-script, javascript, ruby, scheme and lua. Pycoo uses pygments to format the code, so it is very easy to add support for other languages.