Skip to content

Instantly share code, notes, and snippets.

@GitHub30
Last active August 6, 2022 07:02
Show Gist options
  • Save GitHub30/9836012459748570e8a256a1bea85dad to your computer and use it in GitHub Desktop.
Save GitHub30/9836012459748570e8a256a1bea85dad to your computer and use it in GitHub Desktop.
from win10toast import ToastNotifier
toaster = ToastNotifier()
toaster.show_toast("Example two",
"This notification is in it's own thread!",
icon_path=None,
duration=5,
threaded=True)
# pip install windows-toasts
from windows_toasts import WindowsToaster, ToastText1
wintoaster = WindowsToaster('Python')
newToast = ToastText1()
newToast.SetBody('Hello, world!')
newToast.on_activated = lambda _: print('Toast clicked!')
wintoaster.show_toast(newToast)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment