StimPy is a thin PsychoPy wrapper to simplify the creation of visual stimuli.
Use the package manager pip to install StimPy.
pip install stimpy
import stimpy as sp
circle = sp.visual.Circle(
size=(2, 2), fillColor=(1, 1, 1),
pos=sp.Animate([(-40, -20), (-40, 20), (40, 20), (40, -20)], [1, 1, 1, 1])
)
scene = sp.Scene(color=(-1, -1, -1), units="deg")
scene.add(circle, begin=0, dur=4)
win = sp.Window(distance=13, width=26)
trial = sp.Trial(scene, win=win)
trial.start()
trial.save_movie("example.mp4", fps=60)