← Back to team overview

sikuli-driver team mailing list archive

[Question #693105]: 'Region' is not defined when attempting to import

 

New question #693105 on Sikuli:
https://answers.launchpad.net/sikuli/+question/693105

I'm attempting to define all of my regions/images as variables inside of a separate file (definedregions.sikuli) to make it easier to work. I first tried importing from my files as a .py file, and it said region not defined. 
I've tried importing it using the 4 lines below taken from the docs.
import os
myPath = os.path.dirname(getBundlePath())
if not myPath in sys.path: sys.path.append(myPath)
import definedregions

This still gives the region not defined error, I've tried moving my definedregions.sikuli(file I'm attempting to import) to the same folder as the main script, inside the main script's .sikuli folder, moving definedregions.py into the main scripts .sikuli folder and nothing fixes the same error that shows every time.

I have the feeling I'm overlooking something basic but I'm not sure :P 
I've tried different scripts from similar questions but nothing seems to work :(


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.