how to get a beep, OS independent ?

Peter Pearson ppearson at nowhere.invalid
Sun Dec 7 22:13:19 CET 2008

On Sun, 07 Dec 2008 00:40:53 +0100, Stef Mientki wrote:
> I want to give a small beep,
> for windows there's message-beep,
> and there seems to be something like " curses" ,
> but that package seems to be totally broken in P2.5 for windows.
> Any other suggestions ?

Many people have suggested sending an ASCII 07 to your
terminal window, but sometimes you don't have a terminal

Then there's the question of using the sound card versus
using the PC speaker.  Too complicated for me.

I used a kluge: a short C program that beeps the way I want,
in this case using ioctl(fd,KDMKTONE,arg) on /dev/tty0 (this
is Linux).  The program has enough privileges to execute
even when run by unprivileged users, and of course can be
invoked by whatever language you're working in.

To email me, substitute nowhere->spamcop, invalid->net.

More information about the Python-list mailing list