看板 Python 關於我們 聯絡資訊
手機排版很傷眼睛 各位程式高手,小弟初學者 目前遇到瓶頸 想用試試看在python下執行shell script 然後show出此shell script的執行log ,一行一行列出 使用過subprocess.popen communicate, stdout 發現都是最後執行shell script完畢後才出現 想要的內容 因為我不想在背景下看不到執行過程 tkinter介面會出現“沒有回應“ 所以想要找個辦法去解 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 49.217.227.71 ※ 文章網址: https://www.ptt.cc/bbs/Python/M.1506071831.A.D56.html
neil987: 我的做法是 myscript.py > temp.txt read temp del temp 09/22 23:15
neil987: 查了一下 應該是這個 https://goo.gl/2nJQGv 09/22 23:26