System Beep?

Luuk luuk34 at gmail.com
Sat Mar 9 12:53:53 EST 2019


On 9-3-2019 07:27, Steve wrote:
> Mischief almost managed.
> They both work when using IDLE but the second one leaves an empty window to
> be closed.
> I do like the second one.  Is there a follow up command to close that
> window?
> 
> Steve

see below....

> 
> 
> 
> Footnote:
> I am simply a thing that thinks.
> Rene Descartes
> 
> -----Original Message-----
> From: Python-list <python-list-bounces+gronicus=sga.ninja at python.org> On
> Behalf Of Terry Reedy
> Sent: Saturday, March 9, 2019 12:53 AM
> To: python-list at python.org
> Subject: Re: System Beep?
> 
> On 3/8/2019 1:13 PM, Steve wrote:
>> How can I cause a system beep using code?
> 
>   >>> import winsound as ws
>   >>> ws.Beep(500, 1000)
> 
> and
> 
>   >>> from tkinter import Tk
>   >>> root = Tk()
>   >>> root.bell()
> 
> work for me.  The bell is not exactly a bell, but different from a monotone
> beep.
> 
> --
> Terry Jan Reedy
> 
> --
> https://mail.python.org/mailman/listinfo/python-list
> 


root.destroy()

see: 
https://stackoverflow.com/questions/110923/how-do-i-close-a-tkinter-window

-- 
Luuk



More information about the Python-list mailing list