def get_columns(pkt):
 columns = []
 num_columns = endian_int(pkt[5:7])
 pkt = pkt[7:]
 ctmp = ''
 for column in xrange(num_columns):
  cnt = 0
  while True:
   tmp = pkt[cnt]
   if (tmp == '00'):
    columns.append(ctmp)
    ctmp = ''
    pkt = pkt[(cnt + 19):]
    break
   ctmp += tmp.decode('hex')
   cnt += 1
 return (columns, pkt)

def get_columns ( pkt ) : columns = [ ] num_columns = endian_int ( pkt [ 5 : 7 ] ) pkt = pkt [ 7 : ] ctmp = '' for column in xrange ( num_columns ) : cnt = 0 while True : tmp = pkt [ cnt ] if ( tmp == '00' ) : columns . append ( ctmp ) ctmp = '' pkt = pkt [ ( cnt + 19 ) : ] break ctmp += tmp . decode ( 'hex' ) cnt += 1 return ( columns , pkt )
returns list of columns for given table .