python-textile is a Python port of Textile, Dean Allen’s humane web text generator.
Install the ‘textile’ folder on your python path, or pip install textile
.
Optional dependencies include PIL/Pillow (for checking images size)
and regex (for faster unicode-aware string matching).
>>> import textile
>>> s = “”“
… This is a test.
…
… * One
… * Two
… * Three
…
… Link to Slashdot
… “”“
>>> html = textile.textile(s)
>>> print htmlThis is a test.
- One
- Two
- Three
Link to Slashdot
>>>