How to use functions from the main script?
Asked by
Vit
Hello! Sorry for my english.
I have 2 files in the same folder: main.sikuli and second.sikuli
# --- main.sikuli:
def test():
return(123)
import second
reload(second)
from second import *
startSecondScript()
# --- second.sikuli:
from sikuli import *
def startSecondScri
import main
from main import *
y = test()
Result:
[error] script [ main ] stopped with error in line 7
[error] NameError ( global name 'test' is not defined )
How my second script can use functions from main script?
Thanks in advance!
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Vit for more information if necessary.
To post a message you must log in.