-
Notifications
You must be signed in to change notification settings - Fork 428
pyshell
Trent Mick edited this page Jul 16, 2011
·
4 revisions
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>
$ python markdown2.py -x cuddled-lists FOO.txt
>>> markdown2.markdown(text, extras=["cuddled-lists"])
(Return to Extras page.)