sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30211
Re: [Question #260990]: After import a module, how to use the function defined in that module?
Question #260990 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/260990
lynn posted a new comment:
hi,I am using Sikuli IDE_v1.0.1 on linux remote host.
the folder is /home/lynn/MyFunctions.sikuli and /home/lynn/test.sikuli
in MyFunctions.sikuli, there is below function
def Add(x,y):
return x+y
and in test.sikuli, there is as below
import MyFunctions
print Add(5,6)
first time it is working. Then someday when I re-ran the script, it is say "Add is not defined". Then I try to add as
print MyFunctions.Add(5,6), then it is working.
But again in another day when I still tried the script it says "Module object has no attribute 'Add'
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.