Launcher Guide
A launcher is a beamline button that runs an external Python GUI as a separate process. Use it when you want to surface an existing standalone tool from the PyStream toolbar without pulling its dependencies into PyStream itself.
Adding a launcher
Copy src/pystream/beamlines/bl32ID/_launcher_template.py to a new file in your beamline directory (e.g.
mygui.py).Edit
SCRIPT_PATH(or the list of candidate paths),BUTTON_TEXT, and the class name (e.g.MyGuiDialog).Import the class in the beamline’s
__init__.pyand add it to__all__.In src/pystream/pystream.py
_create_beamlines_bar(), add ahasattr(module, 'MyGuiDialog')branch wired to a small_open_my_gui()handler that instantiates the dialog. See_open_xanes_gui()for a working example.Restart PyStream.
The launcher spawns the script with sys.executable and
start_new_session=True so it survives PyStream exit. If the script
isn’t found, the user gets a dialog with the candidate paths and any
installation hint you put in the description.