def write_table_fits(input, output, overwrite=False):
 table_hdu = table_to_hdu(input)
 if (isinstance(output, string_types) and os.path.exists(output)):
  if overwrite:
   os.remove(output)
  else:
   raise IOError('File exists: {0}'.format(output))
 table_hdu.writeto(output)

def write_table_fits ( input , output , overwrite = False ) : table_hdu = table_to_hdu ( input ) if ( isinstance ( output , string_types ) and os . path . exists ( output ) ) : if overwrite : os . remove ( output ) else : raise IOError ( 'File exists: {0}' . format ( output ) ) table_hdu . writeto ( output )
write a table object to a fits file parameters input : table the table to write out .