Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 66c4550552190d445a8747a1f4561a99 > files > 1

python-textile-2.1.4-3.fc13.src.rpm

h1. PyTextile

PyTextile is a simple text to HTML converter.

h2. Usage

<pre>
<code>

>>> import textile
>>> textile.__version__
'2.1.4'
>>> s = """
... _This_ is a *test.*
... 
... * One
... * Two
... * Three
... 
... Link to "Slashdot":http://slashdot.org/
... """
>>> html = textile.textile(s)
>>> print html
<em>This</em> is a <strong>test.</strong>
	<ul>
		<li>One</li>
		<li>Two</li>
		<li>Three</li>
	</ul>
	<p>Link to <a href="http://slashdot.org/">Slashdot</a>
</p>
>>> 
</code>
</pre>