beep again

Fredrik Lundh fredrik at effbot.org
Thu Jan 25 04:46:51 EST 2001


Tim Peters wrote:
> 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.

how about renaming "winsound" to "_winsound", and
introducing a Python wrapper:

    # winsound.py
    from _winsound import *
    platform = ...
    if platform in ("win95", "win98"):
        def Beep(...):
            ...generate wave data...
            PlaySound(data)

(may Will's synthesizer code could fit in there somewhere)

Cheers /F





More information about the Python-list mailing list