Possibility of using atomac package with Sikuli script?

Asked by Abhiram

In order to utilize full automation functionalities, I am attempting to use two automation libraries in unison: Sikuli(Jython) and pyAtom (Python) https://github.com/pyatom/pyatom http://pyatom.com/wiki/Main_Page. Because Jython runs on Java, the imported pyAtom python package (atomac) is treated as a java package which breaks much of the functionality, for example:

import atomac

app = atomac.getAppRefByBundleId('com.apple.Automator')

output:
AttributeError: 'javapackage' object has no attribute 'getAppRefByBundleId'

Is there any workaround to properly treat python packages. If not would subprocessing be an efficient alternative.

Please let me know if any more information is necessary

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Had a short look on the atomic stuff.

Seems to be not only Python, but some native ObjectiveC or C++ based elements included.
Hence it cannot be used with SikuliX(Jython) directly (only Python-only stuff like xlrd)

So subprocess might be a solution (but be aware of the startup time, if the solution runs scripts in a subprocess).
Faster but a bit more complex are solutions based on inter-process-communication like XML-RPC and similar (client-server communication).

Revision history for this message
Abhiram (a-kothapalli97) said :
#2

Thanks RaiMan, that solved my question.