How can we force a computer to play a bell sound when the ASCII bell character is printed?

Viewed 16

It is often the case that when I print certain ASCII characters to the console, they are ignored.

I would like the computer to make a beep sound when we print the bell character chr(7)

import sys

sys.stdout.write(chr(7))

sys.stdout.write("\x07")

print(chr(7))

sys.stdout.flush()

How can we make this happen?

0 Answers
Related