From 12e952a90aaf4ac516f16bd4100602c0b49dea16 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Mon, 6 Jul 2026 23:26:44 +0300 Subject: [PATCH] gh-153259: Add tkinter.systray -- system tray icon and notifications Add the tkinter.systray module with the SysTrayIcon class wrapping the "tk systray" command and the notify() function wrapping "tk sysnotify" (Tk 8.7/9.0 and newer). Co-Authored-By: Claude Opus 4.8 --- Doc/library/tk.rst | 1 + Doc/library/tkinter.rst | 3 + Doc/library/tkinter.systray.rst | 72 ++++++++++ Doc/whatsnew/3.16.rst | 6 + Lib/test/test_tkinter/test_systray.py | 134 ++++++++++++++++++ Lib/tkinter/systray.py | 130 +++++++++++++++++ ...-07-06-14-05-40.gh-issue-153259.sysTr1.rst | 4 + 7 files changed, 350 insertions(+) create mode 100644 Doc/library/tkinter.systray.rst create mode 100644 Lib/test/test_tkinter/test_systray.py create mode 100644 Lib/tkinter/systray.py create mode 100644 Misc/NEWS.d/next/Library/2026-07-06-14-05-40.gh-issue-153259.sysTr1.rst diff --git a/Doc/library/tk.rst b/Doc/library/tk.rst index fa3c7e910ce21f0..c835f2518f7bf63 100644 --- a/Doc/library/tk.rst +++ b/Doc/library/tk.rst @@ -36,6 +36,7 @@ alternative `GUI frameworks and tools