PhoebusGen
raw JSON → 3.2.0 verified Fri May 01 auth: no python
A Python library for programmatically generating CS-Studio Phoebus display files (*.bob). Current version 3.2.0 (requires Python >=3.5). Active development with irregular releases.
pip install phoebusgen Common errors
error AttributeError: module 'phoebusgen' has no attribute 'Screen' ↓
cause Forgot to import Screen correctly.
fix
Use: from phoebusgen import Screen
error FileNotFoundError: [Errno 2] No such file or directory: 'my_screen.bob' ↓
cause The screen was not saved to disk; to_xml writes the file but the path may be relative to current working directory.
fix
Ensure the working directory is writable or provide an absolute path.
error ValueError: Invalid widget version specified ↓
cause Passing an invalid bob_version to a widget constructor.
fix
Use valid version strings like 'default' or specific numeric version supported by Phoebus.
Warnings
breaking Version 3.0.0 introduced widget versioning and breaking changes to init of Screen and widget classes. Screen no longer accepts some positional arguments; use keyword arguments for version parameter. ↓
fix Update code to use Screen('Name', bob_version=...) if setting version explicitly.
gotcha The `to_xml` method writes .bob XML files, not XML in the traditional sense. Ensure the file extension is .bob for Phoebus to recognize. ↓
fix Use `.bob` extension, e.g., screen.to_xml('screen.bob').
deprecated The `action_execute_external_script` method in ActionButton may be deprecated in favor of `action_execute_script` in future versions. ↓
fix Check the latest documentation for updated action methods.
Imports
- Screen
from phoebusgen import Screen - widgets
from phoebusgen.widgets import TextUpdate, ActionButton
Quickstart
from phoebusgen import Screen
from phoebusgen.widgets import TextUpdate
screen = Screen('MyScreen')
widget = TextUpdate('my_pv')
screen.add_widget(widget)
screen.to_xml('my_screen.bob')