I solved an analytic problem using sympy and saved everything in a .py file. When I run the code (which includes init_printing()) with ipython filename.py I get nice unicode output whenever I print within the file with pprint. So far so good.
When I import sympy in ipython qtconsole, I can get nice LaTeX outputs, just as stated in the documentation of sympy. But I get this nice printing only if the interactive console does the prining, i.e.:
Integral(sqrt(1/x), x)
produced a LaTeX image, while
pprint(Integral(sqrt(1/x), x))
does produce unicode output.
When running code from a file with
run filename.py
the only way I see to create output is to use pprint, i.e. I do not get the LaTeX output.
Does anyone see a solution? Thanks alot.