title: Loading Environment Modules from Python
body: <p>I am having trouble figuring this out. I want to module load an aligner-"bowtie" in this case. Below is a snippet of the code I have: </p>
  
  <pre><code>import subprocess
  moduleCmd=['module', 'load','/modules/ogi-mbc/software/bowtie/bowtie2-2.2.4/bowtie2']
  subprocess.Popen(moduleCmd,shell=True)
  </code></pre>
  
  <p>When I run my script, I am getting following message:</p>
  
  <pre><code>cmdModule.c(166):ERROR:11: Usage is 'module command  [arguments ...]
  
  Modules Release 3.2.10 2012-12-21 (Copyright GNU GPL v2 1991):
  
  Usage: module [ switches ] [ subcommand ] [subcommand-args ]`
  </code></pre>
  
  <p>The program is NOT loaded after running the script. </p>
  
  <p>Testing a simple command with subprocess such as:</p>
  
  <pre><code>testCmd=['ls', '-l']
  subprocess.Popen(testCmd,shell=True)
  </code></pre>
  
  <p>I get the expected output.</p>