Hi,Hey, thanks for the responses, Rene and Alex.
Personally, I think a thread is a good idea here too.So, finally, I get to my questions: 1. Is it really so bad to just have it run in a thread and use forever-blocking file reads (do these use a lot of the CPU?)
I think a thread is best here. Then just post events into the pygame event queue.
Before anyone cries out 'but threads are EVIL! and hard to use!!!!', users won't see this thread. It will just post events into the event queue.
A thread has the advantage that it can run at a separate frequency from the users main loop.
class wiimote(object): def update(self): ...do stuff... for each in changedAttributes: self.postEvent(each)
something like that.
2. Does anyone know of a windows dll command that will read from a file with a timeout?
Not needed if you use a thread.
Yeah, that's an advantage.
-Luke