"""Handler for table: Place value fo first column of selected row into a PV """ from org.csstudio.swt.widgets.natives.SpreadSheetTable import ITableSelectionChangedListener id_pv = pvs[0] class SelectionListener(ITableSelectionChangedListener): def selectionChanged(self, selection): if len(selection) != 1: return selection = selection[0] id_pv.setValue(int(selection[0])) widget.getTable().addSelectionChangedListener(SelectionListener())