[IPython-user] magic commands inhibit autoflush of output to console

Fernando Perez fperez.net@gmail....
Tue Jun 3 17:17:21 CDT 2008


Hi Lev,

On Thu, Apr 24, 2008 at 11:30 AM, Lev Givon <lev@columbia.edu> wrote:
> It seems that the invocation of magic commands (e.g., ?,
> %pcat, etc.) causes ipython to delay writing output
> generated by any subsequently executed code to the console until the
> entire block of code in question is run. For instance, if one runs the
> following script
>
> import time
> for i in xrange(3):
>    print i
>    time.sleep(2)
>
> from within ipython using %run myscript, accesses the help system with
> the ? command, and then attempts to run the above script a second
> time, one will notice that no output is written to the console until
> the script finishes running. Is this behavior expected? I have
> observed it using both ipython 0.8.2 and the latest development
> revision on Linux with Python 2.5.2 (in both cases, I removed
> ~/.ipython prior to testing the behavior).

I'm sorry but in the recent whirlwind I lost track of this issue
(similar things ended up elsewhere).  Do we have a bug filed for it
yet?  If not, please feel free to file one so it doesn't fall through
the cracks:

https://bugs.launchpad.net/ipython

Cheers,

f


More information about the IPython-user mailing list