help importing modules
im trying to modularize a macro i use at work but i cant figure out how to import the functions. i use windows 7 in the office and windows 8 at home and the idea is to have a script(s) i can zip up and share easily. for the moment i have a test folder set up like this:
\test_folder
-functions.
-test.sikuli
the test_folder contains only the two .sikuli folders
the code in functions.sikuli looks like this:
def rtb(): #test function
r = Region(
r.hover(
return
the code in test.sikuli looks like this:
import os
myPath = os.path.
if not myPath in sys.path: sys.path.
import functions
rtb()
and i get this error message when i run test.sikuli from the IDE:
[error] Stopped
[error] An error occurs at line 5
[error] Error message: Traceback (most recent call last):
File "C:\Users\
rtb()
NameError: name 'rtb' is not defined
i read the faqs and some questions answered on the forums and i tried importing the functions a few other ways but im stuck. any help would be appreciated.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- j
- Solved:
- Last query:
- Last reply: