Bug? print statement ends with ',' print a new line
Lu
jxlu at fudan.edu.cn
Sat Jun 7 06:51:44 EDT 2003
C:\FAT32\py>type counter.py
import sys
import threading
class Counter:
def __init__(self,count=0):
self.count=count
def start(self):
if self.count>0:
print self.count,'.',
self.count-=1
t=threading.Timer(1,self.start)
t.start()
elif self.count==0:
print self.count
counter=Counter(int(sys.argv[1]))
counter.start()
C:\FAT32\py>counter.py 5
5 .
4 . 3 . 2 . 1 . 0
C:\FAT32\py>
More information about the Python-list
mailing list