Ask Your Question

Revision history [back]

Sage in written in Python, so you can benefit of any good things from it. Searching a couple of seconds led me to the following:

sage: from time import sleep
sage: from sys import stdout
sage: for i in range(10):
....:     stdout.write("\rDoing thing %i" % i)
....:     stdout.flush()
....:     sleep(1)

There might even be dedicated libraries.

Sage in written in Python, so you can benefit of any good things from it. Searching a couple of seconds on the web led me to the following:

sage: from time import sleep
sage: from sys import stdout
sage: for i in range(10):
....:     stdout.write("\rDoing thing %i" % i)
....:     stdout.flush()
....:     sleep(1)

There might even be dedicated libraries.