>
>
> def onScan(self, event):
>> self.myfile = open('foo.txt')
>> self.count = 0
>> self.setTimer(0.01, self.processLine)
>>
>> def processLine(self):
>> line = self.myfile.readline()
>> if line:
>> processLine(line)
>>
>
> This function needs to be defined somewhere obviously!
> It is a global function not a method of your class.
>
Ah, I got this mixed up. I thought this was a function built into python.
So I would need to define setTimer in the MyClass too.
Is there anything that I can read on timers?
>
> self.count += 1
>> self.myGauge.setValue(count)
>>
>
> And now you access the attribute you created in __init__ above...
>
Kind of silly to forget not to make a reference to the gauge bar.
Got that fixed at least.
Thank you so much for replying.
Regards,
Olrik
_______________________________________________
Tutor maillist - [email protected]
http://mail.python.org/mailman/listinfo/tutor