作者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/m.aspx?n=bbs/Python/M.1506071831.A.D56.html
1F:推 neil987: 我的做法是 myscript.py > temp.txt read temp del temp 09/22 23:15