0

There are a few answers floating around about about how to create windows notifications in python (like this one). Each one of those creates their own little taskbar utility, spawns the notifications, then kills the utility once the notification is finished.

I have a windows taskbar utility heavily based on the code found here.

I am curious how someone would add notification functionality that is bound to the existing taskbar utility (using pywin32 and not an external module). Admittedly I am not super comfortable with win32py code so if you could break down how it works that would be even better.

TheBeardedBerry
  • 1,636
  • 5
  • 20
  • 30

1 Answers1

1

Use win10totast module(you should install it firstly).

Here is an example:

from win10toast import ToastNotifier

toaster = ToastNotifier()
toaster.show_toast(u'Title', u'You have receive a notice.',icon_path=None,duration=3,threaded=False)

Read more about this module

jizhihaoSAMA
  • 12,336
  • 9
  • 27
  • 49
  • Apologies, I have used win10toast (i was not clear on this front). This is more of a thought exercise at this point on how one might create your own notifications instead of relying on a module like this one. – TheBeardedBerry Feb 25 '20 at 20:10