0

I created a simple gui tool in python which has a button which starts some process by calling my python module in background.

I want to stop the process if a condition not satisfied and want to popup an error msg.

I am not able to find a way to stop the process once it is started from button. How can i do this without closing the GUI?

For info : I am using PysimpleGUI to create gui.

Reblochon Masque
  • 35,405
  • 10
  • 55
  • 80
Anudocs
  • 686
  • 1
  • 13
  • 54
  • Code is badly needed in your example. There are many ways to "start a process" in Python, some have nothing to do with processes at all but rather Threads. If you're running as a Thread, then you can't "stop" the thread. But, you can send the thread a message or more simplistically, use a variable that is periodically checked by the Thread. – Mike from PSG Jul 04 '19 at 16:33
  • If you are using threads, this article https://www.geeksforgeeks.org/python-different-ways-to-kill-a-thread/ talks about several ways of "killing" them including the ones I mentioned above. There are some interesting techniques in there that I was not aware of. – Mike from PSG Jul 04 '19 at 16:41

0 Answers0