code: def get_jpp_env(jpp_dir):
      
      env = {
          v[0]: ''.join(v[1:])
          for v in [
              l.split('=') for l in os.popen(
                  "source {0}/setenv.sh {0} && env".format(jpp_dir)
              ).read().split('\n') if '=' in l
          ]
      }
      return env
docs: Return the environment dict of a loaded Jpp env.
  
      The returned env can be passed to `subprocess.Popen("J...", env=env)`
      to execute Jpp commands.