I’ve put the following code in a gateway timer script and in the action performed event handler of a vision client button. In the vision button it performs exactly how I expect it would, printing to the console. In the gateway script I expected to see a print out in the wrapper.log file, but I didn’t. I instead got
NameError: global name 'testVar' is not defined
I must be misunderstanding some nuance of scoping in gateway event scripts. Could someone point me in the right direction toward understanding this?
testVar = 'Test' def test_function(): print testVar test_function()