How to remove the "python" header from the notification? ,i am using plyer.notification.notify

Viewed 203
import time
from plyer import notification
if __name__ == '__main__':
    while True:
        notification.notify(
            title="Please drink water now!!!",
            message="The Institute of Medicine (IOM) recommends that men drink"
                    " at least 101 ounces of "
                    "water per day, which is a little under 13 cups",
            app_name="Water",
            app_icon= "C:/Users/sac/PycharmProjects/firstprog/water_reminder/icon.ico",
            timeout=2
            )

        time.sleep(60*60)

The app name is not changing and it's showing "python" instead of "water"

1 Answers

 I don't think its possible to do that within Python, there's a lot that goes to sending a simple toast notification and its not actually your script sending the toast but python.exe, to be specific this line does:

<com:ExeServer Executable="Python.exe" Arguments="-ToastActivated" DisplayName="Toast activator">

thats why you get Python as the title each time.

See this documentation from microsoft on how to do it in C++. https://docs.microsoft.com/en-us/windows/apps/design/shell/tiles-and-notifications/send-local-toast-desktop-cpp-wrl

Related