This is less a problem and more a request for information. Version 2020.1 added this fancy new run window, which is great, but it seems to have strange behavior w/r/t what it sets as the active directory when running a python script. For my purposes in particular (i.e., PyHab), I have scripts that look for a few files in the directory in which the script is saved. However, this is not what PsychoPy recognizes as the working directory (at least on Mac). os.getcwd() instead returns “/Applications/PsychoPy3.app/Contents/Resources”
So 1) why this change, and is it necessary for running a single script? Put bluntly, can we go back to the pre-2020.1 behavior or is there a clear advantage to this new approach?
2) If not, I can get the working directory back where it needs to go with
os.path.dirname(os.path.realpath(__file__)), but is this the best way?
My main concerns have to do with replicability across labs - if you want to share a custom script across labs, and it relies on external files, then this is going to require either updating the path manually in every new lab, or including some code to update it automatically. It also seems bad for backward compatibility.