Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/316.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 管道popen诅咒像输入_Python_Windows_Stdin_Popen_Curses - Fatal编程技术网

Python 管道popen诅咒像输入

Python 管道popen诅咒像输入,python,windows,stdin,popen,curses,Python,Windows,Stdin,Popen,Curses,因此,我的代码通常会这样运行: child = Popen(command, stdout=PIPE, stdin=PIPE, shell=True, bufsize=0, universal_newlines = True) 我的问题是,我在Windows上运行的程序没有使用stdin,它似乎使用了诅咒库的一些变体。就像它读起来很直接一样 有没有一种方法可以通过管道传输到此类输入?如果较低级别使用的是Windows控制台api,则可能没有。tty和Windows控制台非常不同。如果有一个tt

因此,我的代码通常会这样运行:

child = Popen(command, stdout=PIPE, stdin=PIPE, shell=True, bufsize=0, universal_newlines = True)
我的问题是,我在Windows上运行的程序没有使用stdin,它似乎使用了诅咒库的一些变体。就像它读起来很直接一样


有没有一种方法可以通过管道传输到此类输入?

如果较低级别使用的是Windows控制台api,则可能没有。tty和Windows控制台非常不同。如果有一个tty;你本可以试试看,我只是在画平行线,而不是试图做一个文字语句。如果较低级别使用的是Windows控制台api,可能不会。tty和Windows控制台是非常不同的。如果有一个tty;你本可以试对的,我只是在画平行线,而不是试图做一个字面上的陈述。