Pydm

Latest version: v1.27.0

Safety actively analyzes 723144 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 12 of 12

0.3

PyDM v0.3 adds new widgets, new features, and many bug fixes. Please note the breaking changes section below - if you use plot widgets, some action will need to be taken to make your displays work again. As a reminder, the project uses semantic versioning, and as we are still in major version 0, any release may have breaking changes, although we try to keep them to a minimum.

Breaking Changes
- PyDMTimePlot and PyDMWaveformPlot now accept multiple curves for each plot. To edit the curves for a plot in designer, right click it and choose 'edit curves', or double click on the widget. This will bring up a curve editor where the channel, label, and color for each curve can be configured. Please note that existing plots will no longer function, plots in .ui files and plots created in .py files need to be updated to use the new properties provided by the widgets. (thanks laispc)

New Features
- The macro system has been extended to python based displays as well. Any Display subclass should expect to receive a 'macros' keyword argument in the initalizer, which is a dictionary with macro values, keyed on macro names.
- In the 'View' menu there is now an option to show the path to the file you are currently viewing, rather than its title.
- A new SpinBox widget to manipulate float values has been added (thanks mennodoor)
- Display subclasses no longer need to define an 'intelclass' variable, PyDM will inspect the loaded python file and find the appropriate class to use.
- The 'File' menu now has an 'Open...' item which brings up a file dialog box to pick a file to load. (thanks hhslepicka)
- A set of widgets for drawing shapes and static images have been added. These widgets all have alarm sensitivity in fill color and border. (thanks hhslepicka)
- A widget called PyDMByteIndicator has been added for viewing the individual bits in a status 'byte'. Each bit has a configurable label, and the endianness of the byte, and number of bits contained within, are configurable.
- A widget called PyDMSymbol has been added. The symbol widget takes a enum channel as an input, and displays a different image for each state of the enum. Most common image file types are supported, as well as SVG (scalable vector graphics) files.
- PyDM now supports an environment variable to set a default protocol. If you set the PYDM_DEFAULT_PROTOCOL environment variable to a protocol specifier (for example, 'ca' for EPICS), you can define channels throughout PyDM without supplying the 'ca://' before the rest of the address.
- PyDMRelatedDisplayButtons now have an option to open their file in a new window, rather than in the existing window. (Note from Matt: Please use this feature sparingly to avoid a huge number of windows that operators need to clean up!)
- Data plugins can now be added by adding a file in pydm/data_plugins/. It is no longer necessary to modify the PyDMApplication to register a new plugin.
- PyDMPushButtons now have an option to display a confirmation dialog box before sending the value to the PV. Additionally, an 'enter password' box option has been added (thanks hhslepicka).
- Data plugins can now send control limits and units to widgets. These can be used for example to set the maximum and minimum values the widget can handle. Support for control limits and units has been added to existing widgets, where applicable. These properties can be overridden by the display author if desired.

Bug Fixes
- Many problems with PyQt5 compatibility were fixed (thanks gabrielfedel and laispc)
- Handle cases where EPICS PVs return bytestrings for units in Python 3 (thanks gabrielfedel)
- Widgets can implement slots for only one signal type (float, int, or string), they will not fail if all types are not implemented.
- Fix a crash when using PyEPICS plugin, and a PV info field (units, precision, etc.) changes without the value changing.
- Add handling of EPICS long, char, and short data types to EPICS plugins (thanks Tim Madden (argonnexraydetector))
- Clicking on related display buttons without a defined filename property no longer crashes PyDM.
- Image color maps scaling calculations no longer rely on 8-bit image values (thanks mennodoor)
- Fix a bug with PyDMLabel and PyDMSlider where they would not visually show disconnected status when their channel disconnects (thanks laispc)
- Fixed a bug that prevented tooltips from displaying when middle clicking widgets. Also fixes problems when copying channel information to the clipboard when a widget is middle clicked. (thanks scalverson)
- Fix a bug where old widgets were left in an embedded display after the file displayed was changed. (thanks hhslepicka)
- Fix a bug where data plugins would sometimes get passed channels with empty 'address' fields and crash.
- Fix a bug where the slider widget would crash if it was sent an int value instead of a float. (thanks mennodoor)
- Whitespace has been standardized throughout the project to four spaces per tab. (thanks hhslepicka)

0.3.0

0.2.0

This release has a few new features (macro substitutions, a widget for setting enum values, new slider, etc), and a *ton* of bug fixes. Special thanks to gabrielfedel and laispc for their work fixing bugs that cropped up in the last release.

New Features
Macro Substitution

PyDM now supports macro variables, similar to those in EDM or CSS. Anywhere in a .ui file, you can add a macro variable that looks like this: ${variable}. If you are using Qt Designer, you can only add macros in string properties. But, if you want, you can open up the .ui file in a text editor and add one directly.

When you launch a display from the command line, you can specify values for each macro variable using the '-m' command line option. Specify variables as a JSON object. For example:

python pydm.py -m '{"variable": "value"}' my_file.ui

The related display button and embedded display widgets both support passing macros to their files.

Enum Combo Box

A new widget, PyDMEnumComboBox has been added. This widget provides a drop-down selector to set values for an enum channel.

New Slider

The slider widget has been completely re-written from scratch. It is less buggy, has indicators for limits and the current value, and is alarm-sensitive.

New Embedded Display Widget

The embedded display widget has been completely re-written. It is now based on QWidget, not QStackedWidget. As mentioned above, it supports macros, and it has an option to automatically disconnect from PVs when the display is not visible, and reconnect when it becomes visible again. The new widget is easier to embed inside container widgets. If you want the old QStackedWidget behavior, for example, just embed PyDMEmbeddedDisplays inside a QStackedWidget.

Command line args for .py files

Any command line options you give PyDM will be passed into your Display subclasses. You can use this however you want in your Display. As an example, you could pass in a text file with a list of devices, then have your Display populate itself from this list. Arguments are also passed from the 'filename' fields in related display buttons and embedded displays.

Bug fixes

* Fix many issues with handling signals with multiple types
* Widgets not held within layouts no longer disappear
* Write access and connection state supported in most widgets
* Labels have faster alarm handling, better enum support
* Fix some potential crashes in the image widget
* Many more!

0.1.1

This release (v0.1.1) adds support for both PyQt4 and PyQt5. By default, it will first try to use PyQt4, and if that fails to import, it will try to use PyQt5. If you'd like to force PyDM to use one or the other, you can set an environment variable named PYDM_QT_LIB to either 'PyQt4' or 'PyQt5'. If you force a particular PyQt version, you will also have to force pyqtgraph to use the same version as PyDM, which you can do with its own environment variable: PYQTGRAPH_QT_LIB.

0.1.0

Seems like a good idea to start tagging versions at some point in time, so here we are. This release merges in a bunch of new functionality from Teddy Rendahl and Zachary Lentz, including:
- New widgets
- **PyDMPushButton**, a widget which puts a value to a channel when you click it.
- **PyDMShellCommand**, a widget which executes a shell command.
- **PyDMEmbeddedDisplay**, a widget which lets you embed one .ui file within another.
- New features
- **PyDMLineEdit** now has fancy support for units, including changing unit scales client-side.
- **PyDMRelatedDisplayButton** can now be given a path to a .ui file relative to the file the button lives in.
- A new 'local' plugin that can hook into arbitrary python objects
- Support for using the 'PSP' EPICS client, in addition to PyEPICS. The application will automatically determine whether or not you have PSP or PyEPICS, and use the right one.
- Code-base improvements
- Sphinx documentation added for many files.
- Unit tests for the PSP and local plugins.

Thanks to everybody who contributed. Have fun!

Page 12 of 12

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.