[問題]由Tkinter視窗執行.sh
各位大大晚安,
小弟最近在自學python, 目前是用Tkinter做出個視窗.
現在想用個按鈕直接執行一行指令(./xxx.sh)
其中.sh是一個script.請問該怎麼寫function可以達到此功能呢?
def executeSH():
(這邊不知道該如何寫)
button=tk.Button(win,text="Run",command=executeSH)
button.pack()
還是其實不能這樣使用呢?
謝謝您的回答
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 36.226.99.127
※ 文章網址: https://www.ptt.cc/bbs/Python/M.1488471053.A.8EA.html
→
03/03 00:35, , 1F
03/03 00:35, 1F
→
03/03 11:12, , 2F
03/03 11:12, 2F