Example code for asynchronously interfacing an Arduino with Python using pySerial.
You will need pySerial from SourceForge, and an Arduino.
More description here: rotormind.com/blog/2013/Robotics-Talk-at-Pycon/
2019: Updated for py36, use HW_Thread_py36.py. Try this first on older pythons too...