I am having this problem in spyder where, after I run my code and exit the gui.program, the kernel needs to manually be restarted after every time my code is ran, I sometimes even have to shut down spyder as kernel crashes. I am wondering if there is a way for the kernel to automatically be reset after closing the gui.program so I can run it again right after? This closes the program but doesn't restart the kernel.
def EndProgram(self): print("Exiting Program") FigureCanvas.close(self) # behaviour to trigger on exit sys.exit() # exit