您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

Python子进程readlines()?

Python子进程readlines()?

使用subprocess.Popen,用于communicate读取和写入数据:

out, err = subprocess.Popen(['ls','-l'], stdout=subprocess.PIPE).communicate()

那么你可以随时从拆分的过程串stdoutsplitlines()

out = out.splitlines()
python 2022/1/1 18:42:02 有246人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶