In this chapter, you will learn how to create some basic stimuli, and how to present these on a computer display. To do this, you will write scripts in which you will use classes from two external packages: PyGaze (Dalmaijer, Mathôt, & Van der Stigchel, 2014), and PsychoPy (Peirce, 2007, 2009).

These external packages can do pretty much anything you could need in a psychological experiment. This includes presenting stimuli on a monitor; producing sound; collecting responses from keyboards, computer mice, joysticks, and controllers; communicating with eye trackers; logging data; and accurately timing events. Which package you choose is entirely up to you (or your teacher, if you’re using this book ...

Get Python for Experimental Psychologists now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.