Skip to content
Trent Mick edited this page Jul 16, 2011 · 4 revisions

pyshell extra

This allows one to have a Python interactive shell session (as identified by the >>> prompt) be interpreted as an indented pre block without having to indent it. For example, this text:

This is how you can determine your operating system in Python:

>>> import sys
>>> sys.platform
'darwin'

becomes this:

<p>This is how you can determine your operating system in Python:</p>

<pre><code>
>>> import sys
>>> sys.platform
'darwin'
</code></pre>

Command-Line Usage

$ python markdown2.py -x cuddled-lists FOO.txt

Module Usage

>>> markdown2.markdown(text, extras=["cuddled-lists"])

(Return to Extras page.)