I am new to python and am learning things by writing scripts. I have tried the following and none of them seem to be working.
1) commands.getoutput('module load xxx')
2) subprocess.check_output(['module load', xxx'])
None of these change the environment as a side effect of the module call. Can someone tell me what is wrong?
modprobe?module. I found a reference for it on modules.sourceforge.net, but seems innaccessible. Can you give some reference for further help?modulejust does changes to the shell's environment, so unless you start a subshell you won't have any of its effects. None of the variants you are using fit this need.