Preprocessor for Python tutorials
Latest commit fdee3a3 Aug 6, 2012 @sdiehl Updated.
Failed to load latest commit information.
tipy Updated. Aug 6, 2012
.gitignore Commit actual code. Jun 25, 2012 More example. Jun 25, 2012 Ensure formatting. Jun 26, 2012


Preprocessor for Python interactive shell sessions.

Turns this:

x = 3
y = 4
>>> print x + y

Into this:

>>> x + y

Which renders into html:

<div class="highlight">
        <span class="gp">&gt;&gt;&gt;</span>
        <span class="k">print</span>
        <span class="n">x</span>
        <span class="o">+</span>
        <span class="n">y</span>
        <span class="go">7</span>

Or to LaTeX:

\PY{g+gp}{\PYZgt{}\PYZgt{}\PYZgt{} }\PY{k}{print} \PY{n}{x} \PY{o}{+} \PY{n}{y}

Goal is to build a Python shell preprocessor that can integrate with the the pandoc ecosystem for building Python tutorials portable to any format.