Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Supported by

Getting the Python code behind a Open Sesame plugin

Hi all,

I have been working with inline scripts more and more for my experiments, as I need the added flexibility. However, putting together canvases and forms is kind error-prone for me, takes a lot of time. So I was wondering if there was a way to make something with a normal plug-in and then get the Python code running in the background of the open Sesame plug in to the music in an in-line script (or to adapt).

Thanks!

Comments

  • Hi Amir,

    I think what you describe is implemented in PsychoPy. There you can graphically design your experiment and the python code accompanying it, is produced on the fly.
    However, as far as know, this is not possible in Opensesame. If you really want it to be implemented, you can put it on the wishlist and maybe it will be added in a future version.

    Eduard

    Buy Me A Coffee

  • Hi Eduard,
    Thanks for your answer!

    Hm.. I think I was to vague. I mean something simpler I think.

    Let's say I have a plugin with the following Opensesame script:

        widget 0 0 1 1 text_input var='response' return_accepts='yes'
    

    I was under the impression that Open Sesame runs python in the background. I other words, is there a way to get the following code from the script above?

        from libopensesame import widgets
        form = widgets.form(exp)
        text_input = widgets.text_input(form, var='response',
                return_accepts=True)
        form.set_widget(text_input, (0,0))
        form._exec()
    

    Kind regards from Switzerland

  • Hey,

    Maybe that is a little more feasible, but the current answer stays the same: Not possible at the time. But I encourage you, to put it on the wishlist, or even make a feature request on github. It could be a useful addition to Opensesame.

    Eduard

    Buy Me A Coffee

Sign In or Register to comment.