Beep on WIndows 11

Rob Cliffe rob.cliffe at btinternet.com
Sat Nov 11 17:49:51 EST 2023


  Apologies if this is not a Python question.
I  recently moved from a WIndows 10 laptop to a Windows 11 one.
Although there is nothing wrong with the sound on the new machine (I can 
listen to podcasts and watch videos), I find that outputting "\a" to the 
console (aka stdout) no longer beeps (or makes any sound).  This is true 
whether I print "\a" from a python program, or "type 
<a-file-containing-a-bell-character>".
I have found via Google workarounds such as
     os.system("rundll32 user32.dll,MessageBeep")
but it is a trifle annoying to have to modify all of my programs that beep.
Can anyone shed light on this, and perhaps give a simpler fix?
Best wishes
Rob Cliffe


More information about the Python-list mailing list