[IPython-User] carriage return in ipython notebook?

MinRK benjaminrk@gmail....
Mon Apr 9 16:37:41 CDT 2012


Correct, the notebook does not respect '\r' character, as it is not a
terminal emulator.  You can clear the output in the IPython notebook with:

from IPython.core.display import clear_output
clear_output()

See here <https://github.com/ipython/ipython/issues/1527> for a working
progress bar in the notebook.

-MinRK

On Mon, Apr 9, 2012 at 14:27, mqk <kuhlen@gmail.com> wrote:

> Hi
>
> The carriage return character '\r' doesn't seem to work for me in an
> ipython
> notebook (0.12 or 0.13.dev). I'm on linux (xubuntu 12.04).
>
> In an ipython shell:
> In [1]: print 'Hello\rWorld'
> World
>
> In an ipython notebook:
> In [1]: print 'Hello\rWorld'
> Hello
> World
>
> Is this is a bug in the ipython notebook or behavior as expected?
>
> The background to this question is that I'm trying to get
> http://code.google.com/p/python-progressbar/ this progressbar code  to
> work
> properly in an ipython notebook. Currently the progressbar is not displayed
> properly, because (I suspect) the '\r' character isn't being honored.
>
> --
> View this message in context:
> http://python.6.n6.nabble.com/carriage-return-in-ipython-notebook-tp4717456p4717456.html
> Sent from the IPython - User mailing list archive at Nabble.com.
> _______________________________________________
> IPython-User mailing list
> IPython-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-user/attachments/20120409/d052a495/attachment.html 


More information about the IPython-User mailing list