2013-11-21 45 views
1

它甚至可以在Python GUI中创建通知吗?Python原生通知

这里是我的要求:

  • 应工作时,应用程序最小化
  • 可以随时叫
  • 功能应该采取2个PARAMS,标题和通知
+0

欢迎,堆栈.. –

回答

1

这里是如何(从一个通知程序,我很久以前):

import Tkinter, time, tkMessageBox 

top = Tkinter.Tk() 
top.withdraw() #to make the main window invisible 

def notify(title='Default title', notification='Default notification'): 
    tkMessageBox.showinfo(title, notification) 

notify() 
notify('Yo','Did you know this is a notification!') 

符合您的所有要求,并且使用标准python编写。

+0

真的很快,我希望我可以奖励你更多,但我只能接受。 :) – SuperMan