sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #37630
Re: [Question #290844]: Problem with (cross) importing user-defined functions
Question #290844 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/290844
Status: Answered => Open
Tu Mi is still having a problem:
Thanks RaiMan, thanks Karl for the quick reply and for the hints.
Yes it was a typing error while posting this question. Indeed I have START_BUTTON in all scripts. And yes, click(START_BUTTON) is indented :-)
I am still not able to run the script. Following error massages are thrown
[error] script [ main ] stopped with error in line 4
[error] NameError ( global name 'START_BUTTON' is not defined )
[error] --- Traceback --- error source first line: module ( function ) statement 3: secondary ( start ) click(START_BUTTON)
[error] --- Traceback --- end --------------
Once again. The source code is as following
>>> main.py (C:/firstProject/main.sikuli/main.py)
myScriptPath = "C:\\firstProject\\lib"
if not myScriptPath in sys.path: sys.path.append(myScriptPath)
from secondary import *
start()
>>> secondary.py (C:/firstProject/lib/secondary.py)
from sikuli import *
def start():
click(START_BUTTON)
>>> images.py (C:/firstProject/lib/images.sikuli/images.py)
START_BUTTON = "start_button.png"
What is wrong with my script? :-(
Thanks and regards
Tu Mi
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.