← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #238124]: Need sample of script with imported sub-scripts

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
any question does not need any excuse ;-)

yes, we can ;-)

can be used as any other name (in fact what is imported are only the
names)

#sub.sikuli
x = 1

#main.sikuli
import sub
x = sub.x +1
print x -> gives 2

if you have a private global naming convention
#main.sikuli
from sub import *
z = x +1
print z -> gives 2

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