[closed] using python variables as arguments in the draw image function
Hi. I have a string array, and I wanna use its content as a partial path for the draw image function. I know how to do it with opensesame variable (using brackets), but how do I do it with python variables?
Thanks!
Comments
In inline_script items, you use the functions
self.get()andexp.set()to get and set variables respectively. This is described here:For example, let's say that you have a variable
imgwith the value 'smiley', and a file calledsmiley.pngin the file pool. You can then showsmiley.pngwith the following script:Cheers!
Sebastiaan
Check out SigmundAI.eu for our OpenSesame AI assistant!