From 7fb707ec858b8d87ac4c7d2baaa23f0cffe469a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micka=C3=ABl=20V=C3=A9ril?= Date: Sat, 21 Mar 2020 16:31:50 +0100 Subject: [PATCH] Add optionals arguments to getSubtableIndex --- tools/lib/data.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/lib/data.py b/tools/lib/data.py index f834dd0d..c03ba6eb 100644 --- a/tools/lib/data.py +++ b/tools/lib/data.py @@ -73,11 +73,10 @@ class dataFileBase(object): @staticmethod def readFromTable(table,format=Format.LINE,default=dataType.ABS ,firstState=state(1,1,"A_1"),commands=[]): - def getSubtableIndex(table): + def getSubtableIndex(table,firstindex=2,column=0,count=1): subtablesindex=list() - firstindex=2 - for i in range(3,np.size(table,0)): - if str(table[i,0])!="": + for i in range(firstindex+count,np.size(table,0)): + if str(table[i,column])!="": subtablesindex.append((firstindex,i-1)) firstindex=i subtablesindex.append((firstindex,np.size(table,0)))