mrfioc2  2.3.0
evg-seq-revert.py
Go to the documentation of this file.
1 from org.csstudio.opibuilder.scriptUtil import PVUtil, ConsoleUtil
2 
3 table = widget.getTable()
4 
5 times = PVUtil.getDoubleArray(pvs[0])
6 codes = PVUtil.getDoubleArray(pvs[1])
7 
8 N = min(len(times), len(codes))
9 
10 while table.getRowCount()<N:
11  table.insertRow(table.getRowCount())
12 
13 while table.getRowCount()>N:
14  table.deleteRow(table.getRowCount()-1)
15 
16 times, codes = times[:N], codes[:N]
17 
18 for row,(T,C) in enumerate(zip(times, codes)):
19  table.setCellText(row,0,str(T))
20  table.setCellText(row,1,"%d"%C)