Matlab has this great tool called publish. This tool converts a regular matlab script with minimal formatting stuff into structured, nice looking reports (HTML, LateX, RTF). It is capable of handling graphics, mathematical formulae etc.
Is there a similar tool for Python?
There’s pyreport. It captures the “captures its output, compiling it to a pretty report in a pdf or an html file”. With this, you can write scripts that print out your source, getting a nice report in the end.