Notifications Plugin

Plugin to handle error and status notifications.

Supports evaluating arbitrary python expressions placed in gcode DEBUG statements.

#1 = 12.345

; this will set my_label's text to the value of variable #1
(DEBUG, EVAL[vcp.getWidget{"my_label"}.setText{'%4.2f' % #1}])

; this will change the text color of my_label to red
(DEBUG, EVAL[vcp.getWidget{"my_label"}.setStyleSheet{"color: red"}])
class qtpyvcp.plugins.notifications.Notifications(enabled=True, mode='native', max_messages=5, persistent=True, **kwargs)[source]

Notification data plugin

  • enabled (bool, optional) – Enable or disable notification popups (Default = True)

  • mode (str, optional) – native or dbus (Default = ‘native’)

  • max_messages (int, optional) –

  • persistent (bool, optional) – Save notifications on shutdown (Default = True)


Debug messages from LinuxCNC.


Gives messages from GCode. Syntax: (MSG, …) (DEBUG, …) See for more information.


Warning messages from LinuxCNC.


Error messages from LinuxCNC.


Called every 200ms to poll error channel


Initialize the plugin.

This method is called after the main event loop has started. Any timers or threads used by the plugin should be started here.

This method should set self._initialized to true if successfully.


Initialize the plugin after mainwindow is shown.

This method is called after the main window is shown. :param main_window: the VCPMainWindow object. :type main_window: VCPMainWindow

This method should set self._postGuiInitialized to true if successfully.


Terminate the plugin.

This is called right before the main event loop exits. Any cleanup of the plugin should be done here, such as saving persistent data.