howto do a robust simple cross platform beep

Steven D'Aprano steve+comp.lang.python at
Sat Jul 14 05:19:12 CEST 2012

On Sat, 14 Jul 2012 03:00:05 +0200, Gelonida N wrote:

> How do others handle simple beeps?
> I just want to use them as alert, when certain events occur within a
> very long running non GUI application.

Why? Do you hate your users?

> What I do at the moment is:
> For Windows I use winsound.Beep
> For Linux I create some raw data and pipe it into sox's 'play' command.
> I don't consider this very elegant.

There is no cross-platform way to play a beep.

Every few years, people complain that Python doesn't have a standard way 
to play a simple alert sound. Why ask for volunteers to write and 
maintain the code, and suddenly they go silent.


More information about the Python-list mailing list