title: When I write a python script to run Devenv with configure "Debug|Win32" it does nothing
body: <p><strong>Update:</strong> When I use the <code>subprocess.call</code> instead of <code>subprocess.Popen</code>, the problem is solved - does anybody know what's the cause? And there came another problem: I can't seem to find a way to control the output... Is there a way to redirect the output from <code>subprocess.call</code> to a string or something like that? Thanks!</p>
  
  <p>I'm trying to use <code>Devenv</code> to build projects, and it runs just fine when i type it in command prompt like <code>devenv A.sln /build "Debug|Win32"</code> - but when I use a python to run it using <code>Popen(cmd,shell=true)</code> where <code>cmd</code> is the same line as above, it shows nothing. If I remove the <code>|</code>, change it to <code>"Debug"</code> only, it works....</p>
  
  <p>Does anybody know why this happens? I've tried putting a <code>\</code> before <code>|</code>, but still nothing happened..</p>
  
  <p>This is the code I am using:</p>
  
  <pre><code>from subprocess import Popen, PIPE
  
  cmd = ' "C:\\Program Files\\Microsoft Visual Studio 8\\Common7\\IDE\\devenv" solution.sln /build "Debug|Win32" '
  
  sys.stdout.flush()
  p = Popen(cmd,shell=True,stdout=PIPE,stderr=PIPE)
  lines = []
  for line in p.stdout.readlines():
      lines.append(line)
  out = string.join(lines)
  print out
  if out.strip():
      print out.strip('\n')
      sys.stdout.flush()
  </code></pre>
  
  <p>...which doesn't work, however, if I swap <code>Debug|Win32</code> with <code>Debug</code>, it works perfectly..</p>
  
  <p>Thanks for every comment here</p>