The code to generate it was:
> pygmentize -f html -O full -o test.html pyparser.py
This is the same parser that is used for the official Python docs, which are generated in combination with Sphinx. I have only a hazy idea of how that's done.
It's easily customizable if you want.
import sys
from keyword import kwlist
from string import punctuation as punct
from utils import load_data
import html_tags as H
pywords = ['True','False','list','dict',
'int','float','append','extend',
'sys','argv','pop','open','write',
'close','string','time']
try:
fn = sys.argv[1]
except IndexError:
fn = 'example.py'
data = list(load_data(fn))