import time print 1 time.sleep(5)
I executed the code above in an IPython notebook and a regular script separately.
In IPython Notebook it does not print the number “1” until time.sleep(5) , but in a regular script, it first prints the number “1” and goes to time.sleep(5) . What would happen?
This example just illustrates my problem: I use print to print some text at each stage of my code, which takes a lot of time so that I can know what the program is for. I found this to work fine when running a script, but in IPython Notebook print often lags and everything prints when the whole program is complete.
Is there a way to solve this in an IPython Notebook ?
python printing ipython-notebook progress
hd810
source share