[IPython-dev] clear_output() of only last line?
Sun Apr 22 23:06:20 CDT 2012
On Wed, Apr 11, 2012 at 9:43 AM, Michael Droettboom <firstname.lastname@example.org> wrote:
> I'm working on getting our animated progressbars in astropy to work in the
> IPython notebook. I found the recipe of using "clear_output()" in this bug
> That gets things closer, but unlike "\r" at a standard terminal,
> clear_output() clears the entire output chunk, not just the last line. So
> if we have multiple progress bars, or progress bars interspersed with
> logging messages, all but the last progress bar gets deleted.
> For example:
> from IPython.core.display import clear_output
> print "Working"
> for i in range(80):
> print "\r" + ("=" * i)
> Any suggestions?
Have you had a chance to look at the new Animations_and_Progress
notebook in master? It shows examples of how to make both text-based
and graphical progressbars in the nb.
I hope that helps, and sorry for the delayed reply!
More information about the IPython-dev