Greetings dear reader,

this small web application renders user's input in reStructuredText into HTML. It is written in mod_python. I have put it into Public Domain. I hope you find it useful.

The following is the source code of it. Hail to Python for it is so short.

Author:Jiri Barton <>

from docutils.core import publish_string

def index(req, content=''):
    req.content_type = 'text/html; charset=UTF-8'
    return publish_string(
        settings_overrides={'file_insertion_enabled': 0, 'raw_enabled': 0},



<title>reST renderer</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />


<h1>reST to HTML conversion</h1>

<form action="" method="post">
    <label>Type some reST into the box below:</label>
    <br />
    <textarea name="content" rows="20" cols="80"></textarea>
    <br /><br />
    <input type="submit" value="Render" />


apache conf fragment

(be sure to put and rest.html in the directory (such as /home/jbar/scratchpad/rest) and edit the path below... and don't forget to load mod_python)

<Directory "/home/jbar/scratchpad/rest">
    AddHandler mod_python .py
    PythonHandler mod_python.publisher
    PythonDebug On

Alias /rest /home/jbar/scratchpad/rest