On 25/11/12 22:06, Sean Carolan wrote:
I'm working on a python script that runs on a Raspberry Pi.  The script
detects when hardware buttons are pressed, and then runs functions based on
that input.

Oh I'm sorry, I completely misread what you wrote there. I didn't realise you
were talking about hardware buttons, rather than waiting for a key press. Total
brain-fart there on my part, sorry about that.

[...]
So far I've only been able to come up with kludgy implementations with lots
of short time.sleep() calls alternating with checks to see whether the
buttons were pressed or not.

If you show us how you check whether the button is pressed, we may be able to
show you how to run that asynchronously.



--
Steven
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to