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
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
With this setup, you can just double click your new batch file, and it will run, without you even having to open PsychoPy manually.