Is there a way for a python script to load and use environment modules? os.system(\'module load xxx\') doesn\'t work since it executes them in a subshell (at le
os.system(\'module load xxx\')
One of our admins was able to solve the problem for me using os.popen() calls to modulecmd:
os.popen()
modulecmd
cmd = os.popen('/path/to/modulecmd python load my-module') exec(cmd)