[solved] Python inline scripts: Global functions
Is it possible to declare, say, a function or a class (or an instantiation thereof) -- or indeed any kind of Python variable -- at the beginning of an experiment that then persists for the duration? That is, rather than redeclaring the function/whatever every time you need to use it.
Say I have this theoretical inline script near the beginning of my experiment:
def myCustomFunction(foo): print foo class myClass(object): # definitions...
Can I then refer to
myClass in subsequent inline scripts? If so, are there any OpenSesame "best practices" to follow regarding namespacing (insofar as Python allows)?