I am using ipython
notebook (http://ipython.org/notebook.html) to do a demo and it seems like the print function is not working:
I encountered a similar problem (the reload(sys)
was in a package I imported).
My workaround was that at the top of the script, I import sys
, and store sys.stdout
in a separate variable, e.g. stdout
.
Then I import all the other stuff, including the one that calls reload(sys)
.
Then, at the end, I set sys.stdout = stdout
, which redirects the output back to the IPython notebook