Comment 7 for bug 627986

Revision history for this message
Bulkan (bulkan) wrote :

Hi all,

Im trying to import a "common" sikuli script using the following Python code.

common = os.path.join(os.path.dirname(getBundlePath()), 'common.sikuli')
if not common in sys.path: sys.path.append(common)
from common import *

The import is successful but my functions in the common module use methods like click, find, wait etc... which is available to the script that is importing the common module but I get the following error when I call a function from it

NameError: global name 'click' is not defined

I understand that the click function is not available to the common module that I've imported, but my question is where are these methods coming from, they are just there implicitly.

Any help appreciated.

Cheers