Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/285.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python标准代码eof_Python_Stdin_Eof - Fatal编程技术网

python标准代码eof

python标准代码eof,python,stdin,eof,Python,Stdin,Eof,如何将python eof传递给stdin 这是我的密码 p = Popen(commd,stdout=PIPE,stderr=PIPE,stdin=PIPE) o = p.communicate(inputstring)[0] 当我在输入inputstring后运行commd in命令行时,windows仍然希望Ctrl+Z完成接受输入 如何在程序中传递eof或Ctrl+Z 谢谢 p.stdin.close() p.Communication后,完成输入并将EOF发送给commd

如何将python eof传递给stdin

这是我的密码

p = Popen(commd,stdout=PIPE,stderr=PIPE,stdin=PIPE)
o = p.communicate(inputstring)[0]
当我在输入inputstring后运行commd in命令行时,windows仍然希望Ctrl+Z完成接受输入

如何在程序中传递eof或Ctrl+Z

谢谢

p.stdin.close()
p.Communication后,完成输入并将EOF发送给commd