Can anyone explain this?
Henry Baumgartl
h.baumgartl at chello.NOSPAM.nl
Tue Oct 22 16:01:28 EDT 2002
Hello all,
When i use the functions below without the print statement, Python responds
with:
Class instance has no attribute self.startnow
and, of course, nothing happens.
def startTimer(self):
self.startnow = time.time()
def stopTimer(self):
self.stopnow = time.time()
wdur = self.stopnow - self.startnow
wmin = int(wdur / 60)
print str(wmin)
self.wtime = self.wtime + wmin
self.pcvar.set(str(self.wtime))
Put in the print statement, and everything works fine.
I'm on Python 2.2.1 / W2K and confused.
Best regards,
Henry
Please remove NOSPAM. from my address when responding directly
More information about the Python-list
mailing list