title: python - subprocess.Popen() synax errors
body: <p>I am trying to mirror the following shell command using subprocess.Popen():</p>
  
  <pre><code>echo "SELECT employeeid FROM Users WHERE samaccountname=${1};" | bsqldb -S mdw2k8sqlp02.dow.com -D PhoneBookClient -U PortManUser -P plum45\\torts -q
  </code></pre>
  
  <p>It currently looks like:</p>
  
  <pre><code>stdout = subprocess.Popen(["echo", "\"SELECT", "employeeid", "FROM", "Users", "WHERE", "samaccountname=${1};\"", "|", "bsqldb", "arg1etc"], stdout=subprocess.PIPE)
  for line in stdout.stdout.readlines():
      print line
  </code></pre>
  
  <p>It seems that this is wrong, it returns the following standard out:</p>
  
  <pre><code>"SELECT employeeid FROM Users WHERE samaccountname=${1};" | bsqldb arg1etc
  </code></pre>
  
  <p>Does anyone know where my syntax for subprocess.Popen() has gone wrong?</p>