Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 3882

Graphics, sound and multimedia • Re: How do I fix this Python code?

$
0
0
This is untried, but maybe replace everything from #record command \/ onwards with:

Code:

try:    send_command("Record1stChoice")except KeyboardInterrupt:    send_command("Stop")    sys.exit()
I don't know if the Record1stChoice command waits or not. You might have to put an infinite loop after it if it doesn't wait.

The two scripts are basically the same, they only send different commands. So they can be combined.

Statistics: Posted by scruss — Sun Feb 25, 2024 9:53 pm



Viewing all articles
Browse latest Browse all 3882

Trending Articles