beep again

Tim Peters tim.one at home.com
Thu Jan 25 04:35:04 EST 2001


[Mark Hammond, on the great non-beeping beep mystery]
> We learn something new every day :-)

Speak for yourself!  If I admitted to learning something new on *any* day,
all my previous prouncements would be open to question.  I learned this
trick from Guido <wink>.

> I just had a look at the MS documentation for this function [Win32
> Beep()], and it states at the bottom:
> """
> Remarks
> Windows 95: The Beep function ignores the dwFreq and dwDuration
> parameters. On computers with a sound card, the function plays the
> default sound event. On computers without a sound card, the function
> plays the standard system beep.
> """
>
> Not much we can do about it that I can see, except possibly add a note
> to the docstring.

Life could have been worse.  The Excel macro function BEEP is documented as:

    BEEP(tone_num)

    Tone_num is a number from 1 to 4 specifying the tone to be played.

    On most computers, all numbers produce the same sound ...

Sometimes it's hard to believe these things were carefully designed in
advance <wink>.

I'll change the module docs; you can change the docstring.

I suppose the other choice is to remap this to the MS MessageBeep(MB_OK)
function, so it plays the default sound on *all* systems.

na-half-the-joy-of-windows-is-guessing-what-will-happen-
    next-ly y'rs  - tim





More information about the Python-list mailing list