Display scripts run inside the display. They use either jython or _javascript_, they're executed by the JVM, and they can access anything that the java code could access.
connect2j was an attempt to support C-python, so you can use packages like numpy. But of course C Python runs as a separate process outside
of the JVM, so it cannot access anything that the java code could access. Good for crunching numbers, useless if you want to interact with widgets on the screen.
We looked at the py4j package that basically starts a TCP server/client in both the JVM and C python and then communicates between the two so that C python can interact with the display.
That was described in the original display builder online help,
and the referenced connect2j helper is still included in the phoebus version:
In practice, it's been cumbersome and slow, so we don't advertise it any longer.
If your scripts interact with the display, you're better off removing references to connect2j and py4j and just stick to
jython (or _javascript_).
-Kay
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Smith, William via Tech-talk <tech-talk at aps.anl.gov>
Sent: Monday, December 6, 2021 10:11 AM
To: EPICS Tech Talk <tech-talk at aps.anl.gov>
Subject: [EXTERNAL] Phoebus scripts on Windows
Hi,
I am trying to run a Phoebus screen that uses a script. The script changes the dimensions of an image widget depending on the size PV of the image.
The screen and script works in a linux environment but not in Windows(10). In the terminal I get the error “cannot locate package connect2j”
Do I need in stall a python package, if so which one? A quick search brings up nothing for connect2j.
Thanks,
Will
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Mitglied der Hermann von Helmholtz-Gemeinschaft Deutscher Forschungszentren e.V.
Aufsichtsrat: Vorsitzender Dr. Volkmar Dietz, stv. Vorsitzende Dr. Jutta Koch-Unterseher
Geschäftsführung: Prof. Dr. Jan Lüning (Sprecher), Prof. Dr. Bernd Rech, Thomas Frederking
Sitz Berlin, AG Charlottenburg, 89 HRB 5583
Postadresse:
Hahn-Meitner-Platz 1
14109 Berlin
Deutschland
|