Windows version of Python 2.6.4: Is there any way to determine if subprocess.Popen() fails when using shell=True?
Popen() successfully fails when shell=False
returncode will work, although it will be None until you've called p.poll(). poll() itself will return the error code, so you can just do
returncode
None
p.poll()
if a.poll() != 0: print ":("