[IPython-dev] ipython1 and synchronous printing of stdout

Gael Varoquaux gael.varoquaux at normalesup.org
Sun Jul 20 12:46:15 EDT 2008


Hi,

I am making progress on my graphical fronend for ipython1, but I have hit
an interesting small difficulty: currently the way the interreter is set,
it traps all output, and returns it at the end of the execution. This is
quite bad if a users is (in a synchronous, local workflow) running a long
job, and printing information on the advancment of his job, say for
instance:

for i in range(10):
    print i
    sleep(1)

I can off course monkey patch the output_trap with my own write method,
but this seems a bit ugly. What do the ipython1 developpers think the
right way of doing this (and maybe modifying output_trap) is?

Cheers,

Gaël



More information about the IPython-dev mailing list