# How to Use Code from Pavlovia Demos in a Local PsychoPy Environment?

**URL:** <https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366>\
**Category:** Coding\
**Created:** [March 25, 2025, 6:23am UTC](https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366 "2025-03-25T06:23:39Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ananta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/ananta/32/42585_2.png) [@Ananta](https://discourse.psychopy.org/u/Ananta)\
**Post date:** [March 25, 2025, 6:23am UTC](https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366/1 "2025-03-25T06:23:39Z")

</div>

Hello,

I am using PsychoPy in my local environment with Visual Studio Code. I would like to use the code from the demo experiments uploaded on Pavlovia, but I’m not sure which files I should take and use.

I am not very proficient in Python, and I often struggle with PsychoPy.

For example, on the following page, should I use the `.py` file to run this experiment in my local environment?

> **[demos / Dynamic Selective Inspect](https://gitlab.pavlovia.org/demos/dynamic_selective_inspect)**
>
> Use the mouse to control what part of an image you can see. This demo shows you how easy it is to build rich dynamic studies using only...

I know this might be a ridiculously simple question for some people. It’s a bit embarrassing, but I’d really appreciate any help.

Thank you!

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 25, 2025, 9:05am UTC](https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366/2 "2025-03-25T09:05:07Z")

</div>

I would recommend forking the project.

> **[Searching for experiments on Pavlovia — PsychoPy v2024.2.5](https://psychopy.org/online/sharingExperiments.html)**

Alternatively, download the psyexp file and open it in Builder. In this case you would also need the spreadsheet and image folder.

---

<div class="post-metadata">

**Author:** ![Ananta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/ananta/32/42585_2.png) [@Ananta](https://discourse.psychopy.org/u/Ananta)\
**Post date:** [March 28, 2025, 6:00am UTC](https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366/4 "2025-03-28T06:00:08Z")

</div>

Thank you for your response.

I am using the standalone Python version of PsychoPy in VS Code, not the Builder. In this case, would it still be possible to download and use the experiment as you mentioned?

---

<div class="post-metadata">

**Author:** ![wakecarter](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/wakecarter/32/5753_2.png) [@wakecarter](https://discourse.psychopy.org/u/wakecarter)\
**Post date:** [March 28, 2025, 8:23am UTC](https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366/5 "2025-03-28T08:23:20Z")

</div>

I use PsychoPy Builder in VS Code by running psychopy/app/psychopyApp.py

 ![image](https://us1.discourse-cdn.com/flex002/uploads/psychopy/original/3X/5/d/5d1c1e04c9312ad0d1917f1fe3d82fe2a0ee70e5.png)

Is there a reason why you are using Coder? You could download the Python file and use it directly but it will be more difficult to modify.

> [@Wakefield's Daily Tips](https://discourse.psychopy.org/t/wakefields-daily-tips/43371/19):
>
> Builder isn’t Coder I strongly discourage the use of PsychoPy Coder for the creation of psychology experiments because Builder is easier to debug, share with others and translate into PsychoJS for use online. If you already have an experiment written in Coder, pasting the code into Builder code components is not sufficient to turn it into a Builder experiment. The logic of how to arrange an experiment is slightly different because of the way Builder works with components, routines and loops. F…

---

<div class="post-metadata">

**Author:** ![Ananta](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/ananta/32/42585_2.png) [@Ananta](https://discourse.psychopy.org/u/Ananta)\
**Post date:** [April 10, 2025, 9:03am UTC](https://discourse.psychopy.org/t/how-to-use-code-from-pavlovia-demos-in-a-local-psychopy-environment/44366/6 "2025-04-10T09:03:33Z")

</div>

Oh no, I didn’t realize there was a reply—sorry for the late response! I just saw the email notification.

The reason I’ve been using PsychoPy by importing the package in my local Python environment is because the Builder tutorials I found were based on much older versions, and I found them a bit hard to follow intuitively.

Also, using Builder feels quite difficult when trying to work alongside tools like ChatGPT or Claude.
