python 获取 shell 的输出

使用popen

import os

str = os.popen("ls").readlines()

猜你喜欢

转载自blog.csdn.net/u011939633/article/details/108875359
今日推荐