from ecritureBDD import ecritureBDD

def triPacket(lPkt,connec):
    if type(lPkt)!=list:
        print('pas liste')
        return
    if len(lPkt)==0:
        print('vide')
        return
    if len(lPkt)==1:
        triPacket(lPkt[0],connec)
        return
    if len(lPkt)==3 and type(lPkt[0])==str:
        ecritureBDD(lPkt[0],int(lPkt[1]),int(lPkt[2]),connec)
        return
    else:
        for i in lPkt:
            triPacket(i,connec)
