Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Preprocessor for Python tutorials

branch: master

Updated.

latest commit fdee3a3079
Stephen Diehl authored August 06, 2012
Octocat-spinner-32 tipy Updated. August 06, 2012
Octocat-spinner-32 .gitignore Commit actual code. June 25, 2012
Octocat-spinner-32 README.md More example. June 25, 2012
Octocat-spinner-32 setup.py Ensure formatting. June 25, 2012
README.md

tipy

Preprocessor for Python interactive shell sessions.

Turns this:

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

Into this:

>>> x + y
7

Which renders into html:

<div class="highlight">
    <pre>
        <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>
    </pre>
</div>

Or to LaTeX:

\begin{Verbatim}[commandchars=\\\{\}]
\PY{g+gp}{\PYZgt{}\PYZgt{}\PYZgt{} }\PY{k}{print} \PY{n}{x} \PY{o}{+} \PY{n}{y}
\PY{g+go}{7}
\end{Verbatim}

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

Something went wrong with that request. Please try again.