Python bell or beep

Jeffrey Barish jeffbarish at starband.net
Fri Sep 10 16:04:30 EDT 2004


Greer, Joseph wrote:

> I am a former BASIC programmer.  Is there a command I can place in a
> Python program to make a beep or buzz or bell?
> 
>  
> 
> Sincerely,
> Joseph Greer
> Pfizer Inc. - Corp Info Tech
> Assoc Director
> Regional Data Center Programs
> 201 Tabor Road, MS 79-1
> Morris Plains, NJ 07960-2693
> 973-385-0865
>  <mailto:joseph.greer at pfizer.com> joseph.greer at pfizer.com

Dibs.  I can answer this question because I just asked it a week or two
ago.  Use:

sys.stdout.write('\a')
sys.stdout.flush()

Just don't test this code in Idle because it doesn't work there.
-- 
Jeffrey Barish




More information about the Python-list mailing list