You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Script Editor keeps falling back to Python (jython) #17
When I open a python script that was saved in Python (pyimagej) mode, or switch between tabs in the editor, the language keeps switching back to Python (jython)
I don't have any ideas off the top of my head on how to fix this... except that if we are in python mode, then the pyimagej language should be the "preferred" implementation.
However this is fundamentally going to be annoying one way or another, in or out of Python mode or if the user ever wants to use whichever isn't higher priority.
Ship a non-functional PyImageJ script language on Fiji that just exists to notify users of its awareness and guides them to activating Python mode
Activating python mode.. swaps the jars? Or adds another, functional script language with high priority and maybe that just supersedes the low-priority broken one?
It seems to work as intended in that when we're in Java mode, the Jython language takes priority and handles python scripts. When we're in Python mode, the PyImageJ script language takes over. (one minor oddness is that the first time I open the script editor, it picks Jython even in Python mode.. but if I open a python script or swap tabs in the editor, it goes back to PyImageJ as I wanted)
Activity
[-]Opening python scripts defaults to Python (jython)[/-][+]Script Editor keeps falling back to Python (jython)[/+]hinerm commentedon Aug 25, 2025
One idea for how this could work:
activeflag that checks if we're Launching in python modehinerm commentedon Aug 25, 2025
A less invasive idea that I mostly hate:
hinerm commentedon Aug 25, 2025
I have a working prototype that requires refactoring to
scijava-common:It seems to work as intended in that when we're in Java mode, the
Jythonlanguage takes priority and handles python scripts. When we're inPythonmode, the PyImageJ script language takes over. (one minor oddness is that the first time I open the script editor, it picksJythoneven in Python mode.. but if I open a python script or swap tabs in the editor, it goes back to PyImageJ as I wanted)