Imported script cannot resolve 'Key' constant --- needs: from sikuli import *
Asked by
Chris at Aviary
I have an imported script called blur.sikuli. When I run this on its own, I have no problems.
there is a line:
type(Key.F5)
That I use to refresh the page.
If I import this script from another script (main.sikuli) in the same directory, it does not consider Key to be defined.
NameError: global name 'Key' is not defined
Is this a namespace issue? Seems like it should be safe to do without having to import all of my functions as global
Code:
blur.sikuli
---------------
def blurOperation():
click("Blur")
wait(
click(
assert exists(
def blur(self):
type(Key.F5)
wait(
blurOperation()
#blur()
main.sikuli
----------------
import blur
blur.blur()
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply:
To post a message you must log in.