Beeping the console
jeffbarish at starband.net
Wed Sep 1 18:44:31 CEST 2004
Peter Kleiweg wrote:
> Jeffrey Barish schreef:
>> What is the easiest way to beep the console from a Python program
>> (i.e., to do the same thing as echo -e \a)?
> import sys
> or if you don't mind a newline:
> print '\a'
I tried this solution before posting my question, but I tried it in the
Idle Python shell. When I run the command there it outputs \a. Can
anyone explain why? I should have tested it from a Python prompt in a
normal window, but I wasn't aware that Idle sometimes gives a different
BTW, it's worth noting that in my program this solution works better
immediately after the write.
Thanks to everyone for the responses.
More information about the Python-list