docs: def parseargs(argv):
      '''handle --help, --version and our double-equal ==options'''
      args = []
      options = {}
      key = None
      for arg in argv:
          if arg in DEFAULT_OPTION_VALUES:
              key = arg.strip('=').replace('-', '_')
              options[key] = ()
          elif key is None:
              args.append(arg)
          else:
              options[key] += (arg,)
  
      if set(args) & {'-h', '--help'}:
          print(__doc__, end='')
          exit(0)
      elif set(args) & {'-V', '--version'}:
          print(__version__)
          exit(0)
      elif args:
          exit('invalid option: %s\nTry --help for more information.' % args[0])
  
      return options