V5 python to terminate running program

@jpearman , you mentioned a few years ago there might be a way via text code to terminate a running program but it hadn’t been released to the public at the time. Is it available now? I would like my bot to return to standby (or whatever it’s called after you physically terminate a running program) at the end of the code if I break from a while True.

Thank you!

I assume it’s in whatever VM VEXcode is using by now.
assuming you have an instance of the Brain() class, it would be

brain.program_stop()
3 Likes