Importing Sikuli Script
I am attempting to use a Sikuli Script as a module for other scripts in my automation suite (its actually launching the program, making it a module makes me not have to copy/paste it at the beginning of each script, and also makes the scripts independent, as they don't have to rely on the program already being open) Here is some code:
Script I'm Importing (importLogin.
from sikuli import *
import sys
#this is/was a test function (duh) to quickly determine if the import "worked"
def test():
popup("works!")
def launch():
App.
Script that I'm importing to:
import loginImport
importPath = "C:\\path\
if not importPath in sys.path: sys.path.
loginImport.test()
This throws a "NameError: global name 'popup' is not defined"
I feel like i have (but probably haven't) done everything required as laid out in the Sikuli Documentation: http://
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Harry Readinger
- Solved:
- Last query:
- Last reply: