Python本机通知

2024-04-24 08:37:36 发布

您现在位置:Python中文网/ 问答频道 /正文

甚至可以在pythongui中创建通知吗?你知道吗

以下是我的要求:

  • 应用程序最小化时应该可以工作
  • 随时可以打电话
  • 函数应该有两个参数,title和notification

Tags: 函数应用程序参数titlenotificationpythongui
1条回答
网友
1楼 · 发布于 2024-04-24 08:37:36

下面是我很久以前做的一个通知程序:

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编写的。你知道吗

相关问题 更多 >