I am running a PYSTRAY icon which starts a console program. When I try stopping it with this code
def stop_rtd(): print("Stopping RTD") sys.