Opening PsychoPy file in coder view

Dear all:

How to de-link my coder file from Psychobuilder?

I have some PsycoPy builder code but I added some function using Coder (view). Now I want to open this file in PsychoPy, but it opens with PsychoPy builder and lost my function that I added in coder.

Any help?

Many many thanks in advance.

Hi @wuaham, Builder will regenerate the Python file it creates, each time you run the experiment from builder. If you have custom code, your best option is to use a code component, where you can insert snippets of code throughout your experiment. Builder will write this code from the code component to your Python file. This is the best solution. If for any reason, you do not want to do this, then you can edit your Builder-generated Python script, and change the filename, so that Builder does not overwrite it. However, at this point, the file will no longer be updated if you change your experiment in Builder. We recommend the use of code components, because it offers the same flexibility, allowing you too add custom code whilst keeping your script up to date with your builder file.

Thank you. it’s a good idea to save coder file with a different name.