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

I have a number of tests, each one in a separate file. In order to make these 
scripts more readable and clear I have decided to move some of the 
functionality to external file and import it as a module to each script. For 
example consider the following piece of code which I have moved to that module:

type("r", KEY_WIN)
        localLog.debug("WIN+R key pressed")
        paste(link)
        localLog.debug("%s pasted", link)
        type(Key.ENTER)
        localLog.debug("Enter pressed")

This is defined in the module as function "windowsRun(link)" so I when the 
module imported I should have been able to run it like that (assuming that the 
module name is "generics") :

generics.windowsRun(some_link)

When I run my main script it seems that the module is being recognized and 
imported properly  however I end up with the following error:

NameError: global name 'KEY_WIN' is not defined


Any idea why this might happen?

Thanks!
Eugene

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.

_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to     : sikuli-driver@lists.launchpad.net
Unsubscribe : https://launchpad.net/~sikuli-driver
More help   : https://help.launchpad.net/ListHelp

Reply via email to