psychopy.org | Reference | Downloads | Github

Could PsychoPy have been implemented with something other than pyglet?

#1

First off, I’m pretty new to PsychoPy and haven’t looked at the code all that much, so please excuse any ignorance that follows.

I’m curious about the choice of pyglet for implementing the visual backend of PsychoPy. I thought at first that it was crucial to the ability to write experiments procedurally, but pyglet is event-driven like just about any other GUI toolkit. So my question is: is there anything inherent to pyglet that allows PsychoPy to work the way it does? Or could the event and timekeeping systems have been built on top of PyQt, for example, with maybe a performance hit?

#2

Pyglet provides a wrapper for OpenGL which means we get to use hardware accelerated graphics. The other option (in the days when this was written) was pygame combined with pyopengl. The likes of wx and Qt are useful for creating dialog boxes but not suited to precisely-timed graphics.