No. Well, I think you can't do it with print, but you can do this:
import sys
import time
signs = "|/-\\"
while 1:
for i in signs:
sys.stdout.write(i+"\r")
sys.stdout.flush()
time.sleep(0.2)
Regards, Markus
>>> print "a\rb"
b
>>>
>>> for i in range(10000):
... print '\r',i,'and counting',
...
9999 and counting
(not obvious from the copy/paste of the output is that it also displayed
the intervening numbers as it counted). The important thing is to end each
print statement with a comma (or use sys.stdout.write).
> in c and c++ there is a useful way to refresh an output line in printf
> and cout using \r meta command.
that's a control character that's printed to the terminal by printf/cout,
not a "C or C++ meta command"
to print the same character in Python, use the same character escape:
print "\r", count,
(note that if this works or not depends on the terminal you're sending the
output to. most ordinary terminals handle it just fine, but if you're sending
output to an IDE console window, it may not work as expected)
</F>