File: notification.py

package info (click to toggle)
python-plyer 2.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,808 kB
  • sloc: python: 13,395; sh: 217; makefile: 177
file content (24 lines) | stat: -rw-r--r-- 499 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
'''
Module of Windows API for plyer.notification.
'''

from threading import Thread as thread

from plyer.facades import Notification
from plyer.platforms.win.libs.balloontip import balloon_tip


class WindowsNotification(Notification):
    '''
    Implementation of Windows notification/balloon API.
    '''

    def _notify(self, **kwargs):
        thread(target=balloon_tip, kwargs=kwargs).start()


def instance():
    '''
    Instance for facade proxy.
    '''
    return WindowsNotification()