← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #663374]: Unable to call SikuliX 1.1.2 script by import function

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
No, you still do not understand the SikuliX import concept :-(

When talking about a SikuliX script, THE FOLDER of the script is meant!

so a setup might be:

-- someFolder
   -- main.sikuli
   -- sub.sikuli

in this setup

# main.sikuli
import sub
sub.test()

# sub.sikuli
from sikuli import *
def test():
  pass # do something

... no need for any path's or addImportPath

BTW: (basic Python knowledge ;-) backslashes in strings must be doubled or the string must be mentioned as raw string
"C:\\Users\\Sami\\Scripts\\Import.sikuli"
or
r"C:\Users\Sami\Scripts\Import.sikuli"

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.