Python Forum

Full Version: Pyinstaller keeps thread running
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello all . . .

Can anyone help with a Pyinstaller question?

I've built a Tkinter executable with Pyinstaller - it works fine ( apart from being 20MB in size from a 10KB source . . .)
But . . . When the user closes the window to exit the progam it keeps running in the background - two instances in fact as can be found in Windows Task Manager

I've tried every combination of exit() sye.exit() etc etc but no luck.
Is there a simple fix I can build into my code?
Many Thanks for any info
This sounds like problem with your Tkinter code, not pyinstaller
Post your python code in python tags. Also if you have edited your .spec file - post it
The Tkinter section of the program ends with root.mainloop() - without which it causes all kinds of problems in the IDE which I use i.e. Thonny.

Running my prog direct from Python, or within Thonny, all is well.
But the Pysinsaller generated .exe file keeps those (hidden) threads still running.