I want to create an app on Windows using Python that keeps running in the background even after I close the Tkinter window. To open the UI, just clicking on the app in the background apps panel should open it. Eg: The Telegram app keeps running in the background even after the UI is closed. And to open the UI, we can just click on the program or the icon in the background processes panel.
Asked
Active
Viewed 131 times
0
-
I think you are looking for [`wm_protocol`](https://stackoverflow.com/questions/4643007/intercept-tkinter-exit-command). – Henry Yik Oct 01 '20 at 13:24
-
I don't think Tkinter will do this for you. The way I would proceed is by creating multiple programs. One program would be the launcher that checks if an instance of the background process already exists and starts it if it doesn't; it would then launch the Tkinter program either from the launcher or the background process. It is important that you use multiprocessing as multithreading is very slow in python. If I knew more about this I would leave an answer, but maybe this comment will help. https://docs.python.org/3/library/multiprocessing.html – ShayneLoyd Oct 01 '20 at 16:07