sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #27280
Re: [Question #252211]: NameError when running from command line
Question #252211 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/252211
Allen Liu posted a new comment:
Thanks for your time RaiMan.
Here is the complete structure of my script:
All of the *.sikuli files are saved under ${root}:
File ------------------------Import statement------------------Functions Name
|----common.sikuli (has all common functions) ------- from sikuli import * ------ login() ...
|----module1.sikuli--------from sikuli import *;from common import * --------fun1()....
|----main.sikuli (entry script, served as script1.sikuli as mentioned) ------- import common, module1; reload(common);reload(home); from sikuli import *;from home import * ------ login(); fun1()...
When I ran main.sikuli from IDE, everything works fine. But it throws:
[error] NameError ( name 'fun1' is not defined )
Is there a restriction of nested import? Because common.sikuli is
referred everywhere.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.