python threads: newbie question

christoph lehmann at puk.unibe.ch
Thu May 8 10:19:39 EDT 2003


Hi!
I am a python newbie and would
like to know, what you think about the following easy problem:

for a experimental program, which should show a bmp every time I receive
a TTL signal on the parallel port (happens, roughly every 1s), I want to
log also any mouse responses (means, every time the mouse gets pressed,
I log the exact time of the button-down event)...
I think this is something to be done with threads? Do I understand this
right: I have one thread, which polls the LPT  does the buffer-swapping
for the stimulus presentation as soon as a TTL signal is received, and a
second thread which polls the mouse...? 

How could I do this easily?
Thanks a lot for your help


Cheers
Christoph

-- 
Christoph Lehmann <lehmann at puk.unibe.ch>
University Hospital of Clinical Psychiatry




More information about the Python-list mailing list