howto do a robust simple cross platform beep

Chris Angelico rosuav at gmail.com
Sat Jul 14 14:49:11 EDT 2012


On Sun, Jul 15, 2012 at 3:54 AM, Dieter Maurer <dieter at handshake.de> wrote:
> I, too, would find it useful -- for me (although I do not hate myself).
>
> Surely, you know an alarm clock. Usually, it gives an audible signal
> when it is time to do something. A computer can in principle be used
> as a flexible alarm clock - but it is not so easy with the audible signal...
> An audible signal has the advantage (over a visual one) that you can
> recognize it even when you are not looking at the screen (because you
> are thinking).
>
> Unfortunately, I had to give up. My new computer lacks a working
> speaker...

There's a simple cheat you can do. Just invoke some other application
to produce the sound! My current alarm clock comes in two modes: it
either picks a random MIDI file from Gilbert and Sullivan's
"Ruddigore", or it plays the "Alice: Madness Returns" theme; in each
case it just invokes the file with its default association (see the
"start" command in Windows, or "gnome-open" in, well, GNOME).

Of course, working speaker IS a prerequisite.

ChrisA



More information about the Python-list mailing list