Sure, you could do this, where you have two separate loops, one for each experiment, separated by a rest routine, so participants have a chance to rest. Each experiment could use its own routines, or can share them if they follow the same pattern.
Alternatively, you could use a batch file (in Windows) where you would run the batch file to load the experiment Python scripts consecutively, such that when one closes, the other one opens. To do this, open a notepad file, enter the following commands, and save as “runExp.bat” (or whatever you want to call it) and allow any file type when saving, but must have the extension .bat
.
In the .bat file, you will want to add the path to PsychoPys version of Python, which will be in the PsychoPy installation folder, and the path to your experiment.py script. For example
"C:\PsychoPy2\python.exe" "C:\folderContainingExpOne\yourFirstExperiment.py"
"C:\PsychoPy2\python.exe" "C:\folderContainingExpTwo\yourSecondExperiment.py"
With this setup, you can just double click your new batch file, and it will run, without you even having to open PsychoPy manually.