作者ghost108 (Rick-Zeng)
看板Python
标题[问题] 要如何显示出shell script内的log
时间Fri Sep 22 17:17:09 2017
手机排版很伤眼睛
各位程式高手,小弟初学者
目前遇到瓶颈
想用试试看在python下执行shell script
然後show出此shell script的执行log ,一行一行列出
使用过subprocess.popen
communicate, stdout
发现都是最後执行shell script完毕後才出现
想要的内容
因为我不想在背景下看不到执行过程
tkinter介面会出现“没有回应“
所以想要找个办法去解
--
※ 发信站: 批踢踢实业坊(ptt.cc), 来自: 49.217.227.71
※ 文章网址: https://webptt.com/cn.aspx?n=bbs/Python/M.1506071831.A.D56.html
1F:推 neil987: 我的做法是 myscript.py > temp.txt read temp del temp 09/22 23:15