← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #209132]: global variable across modules

 

Question #209132 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/209132

RaiMan posted a new comment:
@ j-the-k
Hey, you got it :-)

I did not think about the possibility to simply say:

myModule1.EnableVerif = EnableVerif (which does the same as setAttr() )

before using some object from myModule1.

I guess I was blocked with the idea, that the variable should already be
set BEFORE the import, to affect level 0 code in the module, that would
be executed at import time.

--- If the value of the EnableVerif value is not changeing during runtime
This does not matter at all. You can change the value at any time and it will be used the next time any code from the module is executed.

Thanks again for this great input.
I will add it to a faq on how to import in Sikuli.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.