\def\pyprompt{\color{black}>>> \color{blue}} \def\pydots{\color{black}... \color{blue}} \def\>{\hphantom{xxxx}} \def\=#1{{\color{teal}#1}\endgraf\smallskip} \def\py#1#2{% \def\tmp{#1}\ifx\tmp\empty\else {\tt\def\\{\hfil\break\pyprompt}\def\.{\hfil\break\pydots}\pyprompt #1}\\% \fi \def\tmp{#2}\ifx\tmp\empty\else {\tt\color{red}#2}\\% \fi \medskip } \def\cmt#1{\quad\hbox{\color{black}\rm #1}} \def\bs{\char92\relax}