My understanding is that PsychoPy is a library for desktop experiments only and if you…
- User
My understanding is that PsychoPy is a library for desktop experiments only and if you want to run behavioral experiments in a web browser, you need to use PsychoJS instead. Is this correct?
Assistant
Not quite correct. PsychoPy has evolved to handle both desktop and online experiments through what's called the "Builder" interface.
When you create an experiment in PsychoPy Builder, it can automatically generate:
- A Python script (using PsychoPy) for desktop/lab testing
- JavaScript code (using PsychoJS) for online deployment
This is called "code synchronization" - the Builder maintains both versions simultaneously. When you're ready to put your experiment online, PsychoPy can export it to Pavlovia (a hosting platform specifically designed for online behavioral experiments) with just a few clicks.
So while it's true that PsychoJS is the JavaScript library used for web-based experiments, you don't need to write PsychoJS code directly. You can create your experiment once in PsychoPy Builder and deploy it both locally and online.
That said, if you're specifically writing code (rather than using the Builder interface), then yes - you'd use PsychoPy for desktop Python scripts and PsychoJS for web-based JavaScript implementations.
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.