Hello, How can I find out the exit code of a process when using the subprocess module? I am passing an email message to a shell script and I need to know whether the shell script threw an error.
Here is my code: p = Popen(cmd, stdout=None, stdin=PIPE, stderr=None) p.communicate(input=msg) I tried something like this: e_stat = p.communicate(input=msg) but the value of e_stat is always '(None, None)' -- Thanks & best regards, Jason Rissler -- https://mail.python.org/mailman/listinfo/python-list