← Back to team overview

sikuli-driver team mailing list archive

[Question #249144]: App() is not defined in imported def

 

New question #249144 on Sikuli:
https://answers.launchpad.net/sikuli/+question/249144

[error] script [ test ] stopped with error in line 4
[error] NameError ( global name 'App' is not defined )

test.sikuli:

myScriptPath = "c:\\Sik\\test\\testLIb"
if not myScriptPath in sys.path: sys.path.append(myScriptPath)
import testLib
testLib.testFn()


testLib.sikuli:

def testFn(): 
    testpad  = App("calc.exe")
    App.open(testpad) 
    popup("Test Fn")
    return()




When the def is in the  main sikuli, it works without error.

test2.sikuli:

def testFn(): 
    testpad  = App("calc.exe")
    App.open(testpad) 
    popup("Test Fn")
    return()

testFn()


Why the error when using an imported sikuli fn?

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