prynt is a Python module to turn your console outputs into HTML or tex file. Just import the prynt module, and your output will be automagically turned into an HTML/tex file.
Getting Started
Prynt is a easy way to generate quite nice reports. It is nowhere near a full CMS webapp: that's even not the purpose.
The goal for prynt, is to provide an easy (really easy) way to generate nice ( quite nice) reports.
Let's see an "Hello World":
from prynt import *pryntonexit()print "*Hello* **World**"
will lead to
Hello World
that's it.
How does it work
The principle is easy :
when importing prynt module, the standard stdout is replace by the prynt one. This prynt stdout, just forward calls to the standard (in fact the one that waas previously in sys.stdout), and store the outputs into a buffer.
the "pryntonexit()" instruction register a simple hook on python exit, that just call the "prynt()" method.
The prynt method, flushes the buffer, and send the buffer to rst2html, save the result (html code) into a html file.
That's the main idea of prynt.
ReST Integration
For example, execute this code :
```
from prynt import *
pryntonexit()
import prynt.rest as rst
print rst.title(Hello Python)
print rst.image("http://www.python.org/images/python