2016-07-06 40 views

回答

0

我認爲這是你需要的。

import os 
os.system("xterm -hold -e scipt.sh") 

將此代碼放入函數中並將該函數鏈接到按鈕。

+0

這一個工作 os.system(「xterm -e bash -c」源base-station.bash; exec bash '「) – Moon

+0

我想你一定要看看這個問題。 http://stackoverflow.com/questions/26236126/how-to-run-bash-command-inside-python-script – dazzieta

+0

非常感謝... – Moon