sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #50055
Re: [Question #677405]: Organizing sikuli scripts into packages.
Question #677405 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/677405
Description changed to:
I'm building an automation framework for an application and am
attempting to create packages with sikuli scripts with similar
structures to normal python packages.
Example:
/modules
/application
/__init__.py
/functions.sikuli
/functions.py
/windows
/__init__.py
/functions.sikuli
/functions.py
The problem is __init__.py doesn't recognize the .sikuli files
(folders), therefore they don't get added to the package.
I can try to cheat my way around this by adding the following to the
__init__.py file but this causes some other issues where the sikuli
modules look in the wrong place for images.
# code
import sys
import os
# Get the base path.
base_path = os.path.dirname(os.path.realpath(__file__))
sys.path.append(os.path.join(os.path.join(base_path, "functions.sikuli")))
import functions
# end
Does Sikuli support package structures similar to python?
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.