code: def main():
      
      usage = "usage: %(prog)s [options] "
      description = "Gather source maps from Fermi-LAT files."
  
      parser = argparse.ArgumentParser(usage=usage, description=description)
  
      parser.add_argument('-o', '--output', default=None, type=str,
                          help='Output file.')
      parser.add_argument('--clobber', default=False, action='store_true',
                          help='Overwrite output file.')
      parser.add_argument('--gzip', action='store_true', 
                          help='Compress output file')
      parser.add_argument('--rm', action='store_true', 
                          help='Remove input files.')
      parser.add_argument('files', nargs='+', default=None,
                          help='List of input files.')
  
      args = parser.parse_args()
      
      hdulistout = do_gather(args.files)
      
      if args.output:
          hdulistout.writeto(args.output, clobber=args.clobber)
  
          if args.gzip:
              os.system('gzip -9 %s'%args.output)
          
          if args.rm:
              for farg in args.files:
                  flist = glob.glob(farg)
              for ffound in flist:
                  os.path.unlink(ffound)
docs: Main function for command line usage