beeping under linux

Alexander Schmolck a.schmolck at gmx.net
Thu Nov 20 13:40:51 CET 2003


dw-google.com at botanicus.net (David M. Wilson) writes:

> Alexander Schmolck <a.schmolck at gmx.net> wrote in message news:<yfsk75wgn87.fsf at black132.ex.ac.uk>...
> 
> > This is only partly a python question, but what is the easiest way to get
> > python to (reliably) beep under linux? By reliably I mean that ``print
> > "\b"`` won't do because it depends on the terminal settings -- so I guess
> > I'm looking for some simple way to more or less directly access the
> > internal speaker (maybe writing to something in /dev/).
> 
> If by 'reliably', you mean 'override the users choice of having the
> speaker on or off', then I think you need a rethink. :)

Being the (sole) user (and not suffering from multiple personality disorder),
such an override seems unlikely.

As I mentioned in my reply to Ben Finney, apart from the fact that I simply
have no idea how to configure comint (or kterm for that matter -- cerainly not
via settings-bell) for (audible) beeping, for this particular scenario
(notification of myself when I'm not necessarily in front of my computer) the
standard terminal bell preference settings are not really that relevant
anyway.

> 
> There are several utilities about that can do the beeping (and music)
> for you, and IIRC even ones that work across platforms.

Great, do you know one for linux (that uses the internal speaker and that
ideally would be preinstalled or come as a Mandrake rpm)? 

> 
> 
> > [The usage scenario is simply to have an effective way of signalling that a
> > long running-process finshed, without me having to constantly look at the
> > screen]
> 
> Suggestion: allow a configurable command to be called, so that users
> can choose their own notification method, eg. /usr/bin/play (a part of
> 'sox').

Sure, I just don't know any suitable command/program.

'as




More information about the Python-list mailing list