ipython/ipython — pull request #1563 by minrk (2012-04-09 22:20:56+00:00)
Title: clear_output improvements

This was a part of PR #1548, but as I kept finding issues, I decided this should be a separate PR. That PR does depend on this one, and should not be merged before this one.

Changes:

* `clear_output()` clears the line, even in terminal IPython, the QtConsole and plain Python as well, by printing `\r` to streams.
* `clear_output()` avoids the flicker in the notebook by adding a delay, and firing immediately upon the next actual display message.
* `display_javascript` hides its `output_area` element, so using display to run a bunch of javascript doesn't result in ever-growing vertical space.