Python Desktop Notification Popup In Linux
Chapter:
Python
Last Updated:
10-07-2021 13:36:21 UTC
Program:
/* ............... START ............... */
import notify2
notify2.init('foo')
n = notify2.Notification('Title', 'Notification content')
if __name__ == '__main__':
n.show()
/* ............... END ............... */
Output
This will show notification popup with title "Title" and content "Notification content"
Notes:
-
In order to show python notification first you have to install the python library notify2.
- By using the notify2.Notification function we can set the title and description of the notification.
- n.show() calling will show the as notification. You can run using the command "python3 filename.py".
Tags
Python Notification, Desktop notification in linux, Python notfication popup