Carriage Return and notebook cell output
Hi!
This code works different in python (console) and within sage's notebook:
>>> print 'foooo','\r','baar'
baaro
print 'foooo','\r','baar'
foooo baar
Is it possible somehow to use CR in notebook?
P.S. Initial problem was to create a progress bar, since no graphical bars found, I tried to use text-based bar, and now I met more generic issue this CR thing.
Variant 2: Perhaps instead of using CR it is possible to completely clear cell's output?
For progress bars, you might need to do something different in the notebook and from the command line. Using http://pypi.python.org/pypi/progressbar/2.2 for the command line might be good. For the notebook, it would be nice to use graphics, maybe drawing a sequence of pngs, each overwriting the previous, as the computation progresses. It might be tricky finding one solution which works for both of the settings.
I imagine that the "interact" functionality has to deal with a problem like this too, but I don't know how it works. Also, the responses to the following might help too (use javascript to update the output): http://ask.sagemath.org/question/517/fast-show-for-cached-plots-for-interact
Looks the same way I did a bit late, but in case of inner html changes - it wont change content immediately.