← Back to team overview

sikuli-driver team mailing list archive

[Question #245009]: import library ImportError: No module named library

 

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

Hi @all,

what do I do wrong here?
Look, I have 2 files in the same directory (file1.sikuli , file2.sikuli)

#in file1.sikuli
----------------------
from sikuli import *

def startApp():
    click(loginButton)
    click(userField)
    type('user')
    click(pwdField)
    type('pwd')

def stopApp():
    click(logout)


#in file2.sikuli
----------------------
import file1

startApp()
wait(2)
find(myButton)
click(myButton)
....

stopApp()

OK, when I start to run the file2.sikuli in SIKULI-IDE I got the error message "import library ImportError: No module named file1"
What do I do wrong here ? All I want is to have 2 seperated sikuli-scripts . One ist my library (file1.sikuli)  and the other one (file2.sikuli) is my main Application where I start my test.

Could you help or have any idea ?

Thank you in advance

Cheers
Loren




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