This works for me: import sys import time for i in range(5): print '\rIndex =', i, sys.stdout.flush() time.sleep(1)
Kent Bryan Fodness wrote: > I ran it both in IDLE and Command Prompt > > On Dec 10, 2007 5:02 PM, Kent Johnson <[EMAIL PROTECTED] > <mailto:[EMAIL PROTECTED]>> wrote: > > How are you running the program? > > Bryan Fodness wrote: > > > > for line in file('test.txt'): > > the_line = line.split() > > if the_line: > > if the_line[0] == 'Index': > > index = float(the_line[-1]) > > print ("\rIndex = %.3f ") %index, > > raw_input("\nExit") > > Here is my output, > > > > Index = 0.000 Index = 0.400 Index = 0.800 Index = 1.000 _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor