System bell

Bengt Richter bokr at oz.net
Fri Apr 1 03:39:22 EST 2005


On Fri, 01 Apr 2005 02:06:07 -0500, Steve Holden <steve at holdenweb.com> wrote:

>Trent Mick wrote:
>> [Baza wrote]
>> 
>>>Am I right in thinking that >>>print "\a" should sound the system, 'bell'?
>> 
>> 
>> It works on the shell on Windows for me (WinXP).
>> 
>> Trent
>> 
>Interesting. From a Cygwin bash shell I got an elegant little dingish 
>sort of a beep (my volume control was set kind of low). I then ran the 
>same code in a Windows shell and nearly deafened myself. It appears that 
>the volume control doesn't affect the Windows XP commans shell beep - 
>even muting the Windows audio output doesn't stop it (though it does 
>stop the Cygwin beep). This could cause heart attacks!
>
Another couple of data points:

Running python 2.3/MSVC6 or python 2.4/MinGW in an NT4 console window,
print '\a' beeps via the PC internal speaker (like winsound.Beep).

Running the bash shell of msys, echo -e '\a' also beeps via the PC speaker.
These are not affected by any volume control that I know of.

But running py2.3 idle, print '\a' displays a square empty box (which I
take to be the symbol for "unprintable" characters). That seems like an
oversight in terminal emulation.

Regards,
Bengt Richter



More information about the Python-list mailing list