Python calls a method that beeps from the machine horn
- 2020-04-02 14:43:19
- OfStack
This example shows how python calls the Beep of a machine horn. Share with you for your reference. Specific analysis is as follows:
The following python code calls the Beep, but of course your horn must Beep, or you might get an error.
import winsound
winsound.Beep(600,1000)
# Among them 600 Is the sound level, 1000 Is the occurrence time, 1000 for 1 seconds
I hope this article has helped you with your Python programming.