Vision Egg is a Python library for generating visual stimuli.

In more detail, it is a high level interface in between Python and OpenGL, and can use inexpensive consumer grade graphics cards to generate precise visual stimuli. A paper with more details can be found here http://journal.frontiersin.org/article/10.3389/neuro.11.004.2008/full