[This page][1] contains code (link at the bottom) and description of how to automatically find eyes in a real-time webcam stream and thereafter track them, looking for blink events. The code is written with openCV in C++ but openCV also has a [python interface][2]. I'd like the C++ code translated to python so I can integrate it into my existing scripts. I'd also like the resulting python script to look for both blinks *and* eye movements (not necessarily where the eyes moved to/from, simply whether they have moved or not). Ideally the blink/movement tracking would be set up so I could run it as a separate process (via python's multiprocessing module) from a main pygame process and communicate the times of blink and movement events to the main process via a queue (I can provide an example of the multiprocessing and queue setup I already use to do other concurrent tasks).
Background: I am a researcher in cognitive science and I need to track the eyes of participants in my experiments to ensure that at certain times they do not blink or move their eyes when staring at a central spot on the computer screen. I typically use python & pygame to code my experiments, and use the multiprocessing module to handle high-cpu or HDD tasks (polling input devices, writing data to file, etc) so that the main pygame process has optimal resources for accurate timing and display of visual stimuli.