![]() ![]() Remember that you need to generate a new. bat file and delete the example experiments in 'psychopy_experiments'. Once you understand how this works, it's best to remove the example lines from the. bat file, and change the parts at the end to the directory/file name for your experiment. It's simplest to copy-paste one of the lines already in the. %~dp0 \psychopy_installation \python.exe %~dp0 \psychopy_experiments \stroop \stroop.py Then, open up the 'run_experiments.bat' file and add the following. Copy the whole directory over to 'psychopy_experiments'. Say you have a Stroop task experiment, with stroop.psyexp and stroop.py files saved in a directory 'stroop_exp'. In order to run your own experiments, you need to copy their directories over to the 'psychopy_experiments' folder. bat file says is that the PsychoPy installation's python executable should launch Python and make it run the scripts 'psychopy_experimentsexperiment1exp1.py' and 'psychopy_experimentsexperiment2exp2.py', one after the other. This means you don't have to worry about the USB drive being named "F:", "G:" or whatever else when you plug it into a computer. With this hack, we're able to create a relative path. bat file is located once you run the file. '%~dp0' is kind of like an environment variable, and is converted to the directory of where the. bat file in a similar fashion on any updated Windows computer, regardless of whether it has Python etc installed or not. If the above steps worked as expected, you just ran a PsychoPy experiment using only files stored on a USB stick. You should see one experiment being run first, showing a text for a few seconds, followed by another similar one shortly thereafter. Try running the 'run_experiments.bat' file.If you used another name than 'psychopy_installation' for the installation directory, you need to open up the 'run_experiments.bat' file with a text editor (notepad) and replace the part where it says 'psychopy_installation' with the name of your installation directory.Put them in the parent directory of the directory you used for the PsychoPy installation ('psychopy_root' in the example path I described above). Copy the 'run_experiments.bat' file and 'psychopy_experiments' from this repo.During the installation process, change the installation directory to a folder on your USB stick, e.Use a computer that doesn't already have PsychoPy Standalone (see their homepage) installed, or uninstall it before proceeding (I haven't found a way around this).Below are are steps that should work in order to achieve this. It's been asked a couple of times on the PsychoPy forums whether it's possible to run PsychoPy experiments directly from a USB stick using Windows. I am not part of its development team and offer no guarantees that the approach I describe in this repo will work - use your own judgment. PsychoPy is a Python package for designing psychological experiment tasks. This project describes how to set up a USB stick so that PsychoPy experiments can be run off of it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |