MacPython Logo from __future__ import *

buy music albums Silver Apples buy mp3 albums Tarrus Riley buy tracks mp3 Kravits buy Reaper albums mp3 buy Kravits albums music buy music Evita CD online albums mp3 Silver Apples download Madonna CD music buy tracks music Kravits download music albums Silver Apples

2003-11-10

Making docutils do python syntax highlighting (for HTML output)

Filed under: docutils, python — bob @ 6:18 pm

http://undefined.org/python/docpytils-0.0.tgz is a simple docutils directive that does simple python syntax highlighting in ReST.. basically, after importing docpytils, you can do something like this:

.. pycode::
    
    python code here..

Like raw, you can also use :file: or :url: as arguments.

Output will look like this:

>>> from __future__ import *
  File "<stdin">, line 1
SyntaxError: future statement does not support import *
>>>

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

Powered by WP-Hashcash.

Powered by WordPress