4
关于 Python 的 popen 无法获取 pipe 的输出,大家有什么头猪吗
source link: https://www.v2ex.com/t/821556
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
使用 proc = popen("command")之后,使用 proc.stdout 获得标准输出流
但是经过测试发现如果 command 里面是比较简单的命令,比如 ping baidu.com 这种那程序就能正常运行,如果是包含有 A 程序 pipe 到 B 的命令,比如 ffmpeg pipe 到 x264.exe 输出就完全无法拿到。请问各位大佬这是咋回事
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK