code: def getpath(cmd, name=None, url=None, cfg="~/.jcvirc", warn="exit"):
      
      p = which(cmd)  # if in PATH, just returns it
      if p:
          return p
  
      PATH = "Path"
      config = RawConfigParser()
      cfg = op.expanduser(cfg)
      changed = False
      if op.exists(cfg):
          config.read(cfg)
  
      assert name is not None, "Need a program name"
  
      try:
          fullpath = config.get(PATH, name)
      except NoSectionError:
          config.add_section(PATH)
          changed = True
      except:
          pass
  
      try:
          fullpath = config.get(PATH, name)
      except NoOptionError:
          msg = "=== Configure path for {0} ===\n".format(name, cfg)
          if url:
              msg += "URL: {0}\n".format(url)
          msg += "[Directory that contains `{0}`]: ".format(cmd)
          fullpath = input(msg).strip()
          config.set(PATH, name, fullpath)
          changed = True
  
      path = op.join(op.expanduser(fullpath), cmd)
      if warn == "exit":
          try:
              assert is_exe(path), \
                  "***ERROR: Cannot execute binary `{0}`. ".format(path)
          except AssertionError as e:
              sys.exit("{0!s}Please verify and rerun.".format(e))
  
      if changed:
          configfile = open(cfg, "w")
          config.write(configfile)
          logging.debug("Configuration written to `{0}`.".format(cfg))
  
      return path
docs: Get install locations of common binaries
      First, check ~/.jcvirc file to get the full path
      If not present, ask on the console and store