def print_headers_as_table(args):
 tables = []
 for filename in args.filename:
  try:
   formatter = TableHeaderFormatter(filename)
   tbl = formatter.parse(args.extensions, args.keywords, args.compressed)
   if tbl:
    tables.append(tbl)
  except IOError as e:
   log.error(str(e))
 if (len(tables) == 0):
  return False
 elif (len(tables) == 1):
  resulting_table = tables[0]
 else:
  resulting_table = table.vstack(tables)
 resulting_table.write(sys.stdout, format=args.table)

def print_headers_as_table ( args ) : tables = [ ] for filename in args . filename : try : formatter = TableHeaderFormatter ( filename ) tbl = formatter . parse ( args . extensions , args . keywords , args . compressed ) if tbl : tables . append ( tbl ) except IOError as e : log . error ( str ( e ) ) if ( len ( tables ) == 0 ) : return False elif ( len ( tables ) == 1 ) : resulting_table = tables [ 0 ] else : resulting_table = table . vstack ( tables ) resulting_table . write ( sys . stdout , format = args . table )
prints fits header(s) in a machine-readable table format .