← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #259137]: Want to just import a segment of code

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
easiest solution: have a look at docs:
http://sikulix-2014.readthedocs.org/en/latest/scripting.html#importing-other-sikuli-scripts-reuse-code-and-images

# your config.sikuli
from sikuli import *
option1 = 2
error7 = "did not work"
# .... what ever needed including methods and classes

# your doSomething.sikuli
from config.sikuli import *
if option1 <> 2:
    print error7

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