how to get a beep, OS independent ?
grahn+nntp at snipabacken.se
Mon Dec 8 22:47:27 CET 2008
On 7 Dec 2008 14:46:53 GMT, Marc 'BlackJack' Rintsch <bj_666 at gmx.net> wrote:
> On Sun, 07 Dec 2008 07:17:30 -0700, Joe Strout wrote:
>> But invoking the standard system beep is such a basic function that it
>> ought to be easier than this. I'm pretty sure it's a single OS call on
>> all platforms. On OS X, for example, it's
>> void NSBeep(void);
>> declared in NSGraphics.h. I'm sure it's something similarly simple on
>> other platforms.
> I'm not so sure. Under Unix the "system beep" is usually in the terminal
> emulation and triggered by sending '\a' to it.
Yes, and a terminal which prints a control character instead of
beeping or flashing the screen, that's highly unusual. I think the
poster tested this in some IDE with an "output window" rather than a
> AFAIK there is no standard beep in X-Windows
There is, actually. It's called the bell, and it can be somewhat
configured using xset(1). It's the single sound you can squeeze of a
standard X server, and it's obviously modeled after the terminal bell.
> so every desktop environment implements
> something like audio notifications.
KDE and Gnome might, but mine doesn't. Things vary so much on Unix.
// Jorgen Grahn <grahn@ Ph'nglui mglw'nafh Cthulhu
\X/ snipabacken.se> R'lyeh wgah'nagl fhtagn!
More information about the Python-list