There's atexit. You might want to try putting something like this near the top of your code, but after where you define send_command():No, the point is when you stop the code it stops the recording. Is there a command or something like sys.exit() I accomplish this?
Code:
import atexitdef stop_recording(): send_command("Stop") atexit.register(stop_recording)# ... the rest of your code follows
Statistics: Posted by scruss — Thu Feb 29, 2024 4:53 pm