G a e l dot V a r o q u a u x at n o r m a l e s u p dot o r g
Literate programming with scipy
I write a lot of little scripts to do some small calculations (eg calculated the field created by a pair of coils described by number of turns, inner diameter, outer diameter... plot the field created, estimate dissipation, water flow needed to evacuated the power dissipated). I like to be able to have print outs of the results to share with my colleagues, or to read for myself and debug. For this I have written a small script that runs in input python file, captures the output (including pylab figure by over-riding the "show()" command) and mixes it with the pretty printed code in a pdf file generated by LaTeX. Turning the display of the code of allows to have a pdf file of the output of the script.
I have moved the script and info about it on a separate page.