← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #211412]: Couple of questions regarding how-to

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Oh yes really stupid :-((

so you have to use

#Framework file is like this (myFramework.sikuli)
locale = sys.argv[1]
exec("import "+locale)
exec("reload(%s)"%(locale))
exec("from %s import *"%(locale))

or if you want to make it more general:

#Framework file is like this (myFramework.sikuli)
locale = Settings.currentLocale
exec("import "+locale)
exec("reload(%s)"%(locale))
exec("from %s import *"%(locale))

and

#main file is (main.sikuli)
Settings.currentLocale = sys.argv[1]
import myFramework
reload(myFramework)
from myFramework import *

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