根據Ignacio的建議(Python remove spaces and append)我試圖將以下命令轉換爲使用subprocess
而不是os.system
。使用Python子進程而不是os.system
腳本:os.system("/usr/local/bin/growlnotify -n emesene -a emesene -t """+title+""" -m """+text+"""""")
我會思考:subprocess.call(['/usr/local/bin/growlnotify', '-n emesene', '-a emesene', '-t ""+title+"""', '-m """+text+"""""'], shell=True)
但它不工作。任何想法如何得到這個工作?我查看了Python文檔並查看了這裏,但我無法弄清楚它!
BTW的title
和text
距離的emesene信使通知系統
考慮接受伊格納西奧的答案在相關的問題。 – 2011-06-10 17:55:50
哎呦,我以爲。 – 2011-06-10 18:01:46