code: def main(argv=None):
      
      parser = argparse.ArgumentParser(
          description='Event storage and event proxy.',
          usage='%(prog)s <configfile>'
      )
      parser.add_argument('--exit-codeword', metavar="MSG", dest="exit_message",
                          default=None, help="An incoming message that makes"
                                             " Rewind quit. Used for testing.")
      parser.add_argument('configfile')
  
      args = argv if argv is not None else sys.argv[1:]
      args = parser.parse_args(args)
  
      config = configparser.SafeConfigParser()
      with open(args.configfile) as f:
          config.readfp(f)
  
      exitcode = run(config, args.exit_message)
      return exitcode
docs: Entry point for Rewind.
  
      Parses input and calls run() for the real work.
  
      Parameters:
      argv    -- sys.argv arguments. Can be set for testing purposes.
  
      returns -- the proposed exit code for the program.