Hello all,
I am trying to dynamically write to the same line of the console. The code
below does work in standard consoles but dosn't work in Spyder, at least
with its default settings. Why?
I am working under Windows, Spyder 2.1.11.
import sys
import time
sys.stdout.write('static and ')
last_lenght = 0
for i in "\\|/-\\|/-":
sys.stdout.write('\b' * last_lenght) # go back
sys.stdout.write(' ' * last_lenght) # clear last dynamic output
sys.stdout.write('\b' * last_lenght) # reposition
outText = i + 'dynamic'
sys.stdout.write(outText)
last_lenght = len(outText)
sys.stdout.flush()
time.sleep(0.5)
--
You received this message because you are subscribed to the Google Groups
"spyder" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/spyderlib?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.