| Reference | Downloads | Github file for running experiments one after the other?


Hi there,

On the old psychopy-users group, mention is made of a script that can be used to run multiple experiments one after the other (see post from Jeremy below).

The link is now deprecated - I was wondering if a similar script exists anywhere else?

A cross-platform way to do this is to manually compile your individual Builder experiments into code, and save the code for each experiment as a .py file. (Save them all into a new clean directory–just one directory for the whole set, not a new one for each script.) Then download a short python script,, from here: Save it in the same directory as the .py files (and have nothing else in the directory). Then execute, e.g., from the command line: python

That will find and then call all of the PsychoPy experiments in order. You can name the files in such a way that it controls the order in which they will be run (they get sorted by file name). Its also easy to randomize the order instead.

Only tested on a mac (and not thoroughly tested).


Hi, I’ve posted something on that topic a while ago:

I’ve wrote a command line tool to run a python module from the PsychoPy environment.
In that same post I also explain how to build a .psyexp into a .py using that tool (so no need to open the PsychoPy environment any more).

Didn’t test it with the most recent versions of PsychoPy though. Give it a try.

Hope this may help.


Tested now with PsychoPy-1.85. Here’s an example of usage (run in a terminal window), supposing that your python script is in the current directory:

python -r /Applications/ -w pwd -p -a

In this case, I use the default python interpreter installed in my system to run (that was the assumption). You could get the same result through a bash script (see attachment: rename as and perform a chmod 766. Possibly edit to update some paths).

PsychoPyPython.csv (1.7 KB)



I just discovered how you can run a .py from within the PsychoPy environment. On OS X, it’s as easy as

open -W -n -a /Applications/ --args -x

So to run multiple experiments, one after the other, just make a list of commands like the one above.