def METHOD_NAME():
  output = subprocess.check_output(["scram", "ru", "-sh"])
  for line in output.split(";\n"):
    if not line.strip(): continue
    match1 = re.match(r'^export (\w*)="([^"]*)"$', line)
    match2 = re.match(r'^unset *((\w* *)*)$', line)
    if match1:
      variable, value = match1.groups()
      os.environ[variable] = value
    elif match2:
      for variable in match2.group(1).split():
        del os.environ[variable]
    else:
      raise ValueError("Bad scram ru -sh line:\n"+line)
  sys.path[:] = eval(subprocess.check_output([thisfile, "dummy", "--print-sys-path"]))