def table_extend(tables, keep_headers=True):
 from copy import deepcopy
 for (ii, t) in enumerate(tables[:]):
  t = deepcopy(t)
  if (t[0].datatype == 'header'):
   t[0][0].data = t.title
   t[0][0]._datatype = None
   t[0][0].row = t[0][1].row
   if ((not keep_headers) and (ii > 0)):
    for c in t[0][1:]:
     c.data = ''
  if (ii == 0):
   table_all = t
  else:
   r1 = table_all[(-1)]
   r1.add_format('txt', row_dec_below='-')
   table_all.extend(t)
 table_all.title = None
 return table_all

def table_extend ( tables , keep_headers = True ) : from copy import deepcopy for ( ii , t ) in enumerate ( tables [ : ] ) : t = deepcopy ( t ) if ( t [ 0 ] . datatype == 'header' ) : t [ 0 ] [ 0 ] . data = t . title t [ 0 ] [ 0 ] . _datatype = None t [ 0 ] [ 0 ] . row = t [ 0 ] [ 1 ] . row if ( ( not keep_headers ) and ( ii > 0 ) ) : for c in t [ 0 ] [ 1 : ] : c . data = '' if ( ii == 0 ) : table_all = t else : r1 = table_all [ ( - 1 ) ] r1 . add_format ( 'txt' , row_dec_below = '-' ) table_all . extend ( t ) table_all . title = None return table_all
extend a list of simpletables .