Q:

Having trouble in importing sikuli modules in python . I am using RIDE to run python script

I'm having trouble getting sikuli+python. Whenever i execute python script through RIDE(robot framework IDE), i am seeing issue in importing sikuli api. I tried by adding sikuli path in environment variable and also by placing sikuli lib in working directory. still same issue.
Python and robot framework version
Robot Framework 2.6.3 (Python 2.7.2 on win32)
[ ERROR ] Error in file 'C:\Sanity_Automation\Work_Project\robot_suite\quick_run.txt' in table 'Settings': Importing test library 'C:\Sanity_Automation\Work_Project\TestCreator.py' failed: ImportError: No module named sikuli.Sikuli
PYTHONPATH: ['C:\Sanity_Automation\Python272\lib\site-packages\robot\libraries', 'C:\Windows\system32\python27.zip', 'C:\Sanity_Automation\Python272\DLLs', 'C:\Sanity_Automation\Python272\lib', 'C:\Sanity_Automation\Python272\lib\plat-win', 'C:\Sanity_Automation\Python272\lib\lib-tk', 'C:\Sanity_Automation\Python272', 'C:\Sanity_Automation\Python272\lib\site-packages', 'C:\Sanity_Automation\Python272\lib\site-packages\wx-2.8-msw-unicode', '.']
Traceback (most recent call last):
File "C:\Sanity_Automation\Python272\lib\site-packages\robot\utils\importing.py", line 84, in _non_dotted_import
module = _import_module_by_path(name)

File "C:\Sanity_Automation\Python272\lib\site-packages\robot\utils\importing.py", line 38, in _import_module_by_path
module = __import__(modname)

File "C:\Sanity_Automation\Work_Project\TestCreator.py", line 1, in 
import ospf

File "C:\Sanity_Automation\Work_Project\ospf.py", line 1, in 
from sikuli.Sikuli import *

A:

To use Sikuli directly you will need to use the jython version of robotframework, however if this is not an option due to other libraries you depend on, I have been working on my own solution to this problem - I have created a client/server library that runs Sikuli on the server using jython, but runs a pure python client which can be used to build your test's business objects. 
The eventual goal is to provide a library for import which provides enough of an interface for most but gives a flexible base to extend -as I'm currently the only person I'm aware of who uses it, I'm not quite sure what it would be most useful to put in this, but will happily give support where I can. 
Currently I am using it myself at work to run a regression pack against a flash application, so while it is at an early stage in development, it is already in a useful state...

