[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

System Beep?

On 2019-03-08 22:11, Steve wrote:
> Import winsound
> winsound
> No error, no beep either.
You haven't called anything.

>>> import winsound
>>> dir(winsound)
'MB_ICONQUESTION', 'MB_OK', 'MessageBeep', 'PlaySound', 'SND_ALIAS', 
'__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
>>> help(winsound.Beep)
Help on built-in function Beep in module winsound:

Beep(frequency, duration)
     A wrapper around the Windows Beep API.

       Frequency of the sound in hertz.
       Must be in the range 37 through 32,767.
       How long the sound should play, in milliseconds.

>>> winsound.Beep(200, 1000)

There's sound from the PC's sound system, but not from the internal 
speaker. (Is it even a speaker? It might be a piezo buzzer.)

> -----Original Message-----
> From: Python-list < at> On Behalf Of Peter Otten
> Sent: Friday, March 8, 2019 3:42 PM
> To: python-list at
> Subject: RE: System Beep?
> Steve wrote:
>>> You have a typo. It is winsound, not winDsound.
>> Yes, I saw that.  It still failed with, or without, the ?d?.  I played 
>> with case and the use of (). They all produced similar errors
> Did you import the winsound module before trying to use it?
> --