title: why is this linux command not working when executed using python?
body: <p>I want to execute this linux command</p>
  
  <p>"cat cflow_image.py | mailx -s "CFLOW Copy" foo@.foo.com". My requirement is to use this command in the python script.I am using subprocess module to achieve this.</p>
  
  <p>Here is my piece of code for doing this,</p>
  
  <pre><code>def send_mail(mailid): 
     # This is mail the testbed info to the user
     mailid = args.mailID 
     print "* INFO file will be sent to your mailid *"
     subprocess.call("cat info.txt | mailx -s \"DEVSETUP\" {0}").format(mailid)
  </code></pre>
  
  <p>Following is the error when it is executed,</p>
  
  <pre><code>Traceback (most recent call last):
    File "dev-installer.py", line 243, in &lt;module&gt;
      send_mail(args.mailID)
    File "dev-installer.py", line 204, in send_mail
      subprocess.call("cat info.txt | mailx -s \"DEVSETUP\" {0}").format(mailid)
    File "/sw/packages/python/2.7.4/lib/python2.7/subprocess.py", line 524, in call
      return Popen(*popenargs, **kwargs).wait()
    File "/sw/packages/python/2.7.4/lib/python2.7/subprocess.py", line 711, in __init__
      errread, errwrite)
    File "/sw/packages/python/2.7.4/lib/python2.7/subprocess.py", line 1308, in _execute_child
  </code></pre>