Posts for: #Python Tips

Capturing Interactive Output from Python Interpreter in Python

Everything has to be automated. As I’m writing a small book on Python, I have to update the version of the language every year :-D. With Python 3.1, the problem became more serious, because now I have to test the examples in the book with this new version that is not fully compatible. The book is being written in LaTeX, using TextMate and Skim on Mac OS X. I made a mistake by manually inserting the Python source code into the LaTeX text; now I have to review each script individually.

Read more

Capturing Interactive Output from Python Interpreter in Python

Everything has to be automated. As I’m writing a small book on Python, I have to update the version of the language every year :-D. With Python 3.1, the problem became more serious, because now I have to test the examples in the book with this new version that is not fully compatible. The book is being written in LaTeX, using TextMate and Skim on Mac OS X. I made a mistake by manually inserting the Python source code into the LaTeX text; now I have to review each script individually.

Read more