Description
The simplest example to demonstrate is to run e.g.
print("someline\n2ndline\n\x1b[Aembed ")
in both ipython console (where it works correctly) where it would override 2ndline
with embed
, and then in the web notebook, where it would not.
Why I care... tqdm
module is quite handy for providing progress bars, and uses this "line navigation" ansi characters to be able to output multiple progress bars in the terminal at the same time. They do provide progressbars using ipython widgets BUT you need to code for the notebook specifically. Since I was told that there is no way within python process to know either it is currently outputing to web ui or console, we simply can't provide dynamic switching between one implementation and another :-( any advice on how to handle this situation would be very welcomed! Ideally I would like to see web frontend providing support for basic ANSI navigation symbols since it should be relatively easy to implement their support (I think ;) ).
note: originally filed against ipython/ipython: ipython/ipython#10643