- Notifications
You must be signed in to change notification settings - Fork 440
pyshell
karlcow edited this page Dec 3, 2011 · 4 revisions
The pyshell
extra 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 pyshell FOO.txt
>>> markdown2.markdown(text, extras=["pyshell"])
(Return to Extras page.)