subprocess .POPen echo code example Example: subprocess .POPen echo proc=subprocess.Popen('echo hello world', shell=True, stdout=subprocess.PIPE)