1 from org.csstudio.opibuilder.scriptUtil
import PVUtil, ConsoleUtil
3 table = widget.getTable()
5 times = PVUtil.getDoubleArray(pvs[0])
6 codes = PVUtil.getDoubleArray(pvs[1])
8 N = min(len(times), len(codes))
10 while table.getRowCount()<N:
11 table.insertRow(table.getRowCount())
13 while table.getRowCount()>N:
14 table.deleteRow(table.getRowCount()-1)
16 times, codes = times[:N], codes[:N]
18 for row,(T,C)
in enumerate(zip(times, codes)):
19 table.setCellText(row,0,str(T))
20 table.setCellText(row,1,
"%d"%C)