[request] make SikuliX available for Python (C-based real Python)

Bug #1818514 reported by RaiMan on 2019-03-04
24
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Sikuli
Medium
RaiMan

Bug Description

****** watch the development
https://github.com/RaiMan/sikulix4python
----------------------------------------

currently the plan is to base the implementation on py4j

some things have to be changed and added in SikuliX.

RaiMan (raimund-hocke) on 2019-03-04
Changed in sikuli:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → RaiMan (raimund-hocke)
milestone: none → 1.1.4
Dillon (dillonm197) wrote :

This is something I'd love to see. The projects I've been working for have hit a road block in regards to automation. The applications I'm testing are cross platform on windows and web. We've been utilizing selenium and sikuli for different tasks but would love to be able to utilize both in the same scripts without using hacky work-arounds. I understand that it is already possible to implement selenium and Sikuli together by using java, but I'm really fond of python's easy syntax and flexibility.

RaiMan (raimund-hocke) on 2019-03-07
summary: - [1.1.4] make SikuliX available for Python (C-based real Python)
+ [request] make SikuliX available for Python (C-based real Python)
Tim B (tangob) wrote :

I have to say, I am also very excited for this possibility (for pretty much the exact same reasons as @Dillon). Anxious to see what happens!

Dillon (dillonm197) wrote :

Just to continue off https://answers.launchpad.net/sikuli/+question/679034. I see there has been substantial progress made with allowing sikuli to run python scripts outside of .sikuli folders. I've already started testing some of my projects with a more pythonic layout and can say that this is a seriously amazing addition.

Has there been any progress with implementing py4j? Is the goal going to be to reference the sikuliapi.jar with it and fork a sikuli module in python, or will that be handled by the front end developers to strip out what functions and classes they want on there own? Is there anything that I can do to help advance the development of this feature?

As always, amazing work RaiMan!

RaiMan (raimund-hocke) wrote :

Good job - besides adding features (commits on GitHub) I did not yet tell anything about that ;-)

Did you notice the following:
- when opening a .py script the bundlepath (the first place where images are looked for) is set to the containing folder (like it is with .sikuli scripts)

- of course you can use the setBundlePath() and ImagePath features to point to other image folders

- a new feature special for .py: if the script contains a statement
setBundlePath("path to image folder")
then this of course will have the wanted effect at runtime, but now also for the IDE situation:
- when opening the file, this statement is processed and captured images will be stored there and shown as thumbs in the IDE
- if you add the statement after having opened it, switching to another tab and back will activate this feature as well as using Reset from the tab context menu.

The docs are still waiting to be filled with this information ;-)

RaiMan (raimund-hocke) wrote :

About py4j usage:

I already have a proof of concept.

Today I will add a new repo to GitHub: Sikulix4Python

where you can watch the goals and the development.

RaiMan (raimund-hocke) on 2019-03-15
description: updated
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers