sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #06540
Re: [Question #177227]: Sikuli IDE support open python
Question #177227 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/177227
Status: Answered => Open
jeromy is still having a problem:
Hi RaiMan,
Thanks for your reply!
I've already ready through the relating docs. But I've encountered
problems when import my .sikuli project.
Following is the directory structure.
| - automation
| - Site.sikuli
| | - Site.py
|
| - FirefoxSettings.sikuli.
| | - FirefoxSettings.py
I need to import FirefoxSettings in Site.py, I've added "from sikuli
import *" in both .py files.
"the directories/folders containing your .sikuli’s you want to import
have to be in sys.path"
So, I've try the following solution, and add the snippet into Site.py
:
# works on all platformsimport os# get the directory containing your
running .sikulimyPath = os.path.dirname(getBundlePath())if not myPath
in sys.path: sys.path.append(myPath)
# now you can import every .sikuli in the same directoryimport FirefoxSettings
It doesn't work.
So I tried another solution, "Sikuli automatically finds other Sikuli
scripts in the same directory, when they are imported".
I moved the FirefoxSetting.sikuli into Site.sikuli, It still doesn't work.
Any suggestions?
Thanks!
2011/11/2 RaiMan <question177227@xxxxxxxxxxxxxxxxxxxxx>
> Your question #177227 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/177227
>
> Status: Open => Answered
>
> RaiMan proposed the following answer:
> already looked at ???
>
> http://sikuli.org/docx/globals.html#importing-other-sikuli-scripts-
> reuse-code-and-images
>
> Use one .sikuli as container for your images. All can be done in the IDE
> - no need to do anything in the .py
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/177227/+confirm?answer_id=0
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/177227
>
> You received this question notification because you asked the question.
>
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.