Python interface to Eclipse Scripting API
"Pi-e-Sappy" for research use only.
A passion project to help accelerate breakthroughs in medical physics research by bringing the power of Python into the Varian API ecosystem. PyESAPI combined with Jupyter Notebook gives you a "command line to Eclipse" allowing you to rapidly prototype your ESAPI scripts or research ideas.
cd commandpip install pyesapipip install jupyterjupyter notebookPyESAPI wraps the official ESAPI interface, so a majority of the guidance on ESAPI caries over.
"Online" Help documentation in Eclipse External Beam (under question mark menu in upper right-hand side of the window)
Varian API Book - contributions from the usual suspects
ESAPI Code Samples - full ESAPI projects from previous workshops
ESAPI Subreddit - active ESAPI community
pip install --upgrade pysapiNow that you've had a chance to explore the capabilities of PyESAPI, it's time to get more organized. Below are some recommendations on platforms and software to develop with.
For those wishing to contribute to PyESAPI or use PyESAPI with pre-released local builds of Eclipse.
Set custom ESAPI_PATH (to DLLs) before import (bypasses production directory path search)
import os
os.environ['ESAPI_PATH'] = r'C:\Users\CoolKid\Source\Magic\Bin\Debug64'
import pyesapi
# ...To create lintable code and enable code completion (in Visual Studio Code at least) we can generate python stubs for ESAPI libs using IronPython...
git submodule update --init (ironstubs)cd stubgenstubgen.ps1 (if you hit a Pdb prompt, type continue)No open issues yet, or sync has not completed.