小编sam*_*ami的帖子

python - 如何使用popen管道输出?

我想用pipe我的文件输出,我popen该怎么做?

test.py:

while True:
  print"hello"
Run Code Online (Sandbox Code Playgroud)

a.py :

import os  
os.popen('python test.py')
Run Code Online (Sandbox Code Playgroud)

我想使用管道输出os.popen.我怎么能这样做?

python popen

8
推荐指数
2
解决办法
5万
查看次数

标签 统计

popen ×1

python ×1