beeping portably

Bengt Richter bokr at oz.net
Mon Mar 21 05:13:36 EST 2005


On 20 Mar 2005 09:03:25 -0800, "Jim" <jhefferon at smcvt.edu> wrote:

>Hello,
>
>I'd like to emit beeps.  The twists are that (1) I hope to have control
>over the frequency of the beeps and their duration and (2) I'd like the
>solution to be portable across Linux, Windows, and OS X.
>
>I've done some searching of this group and the solutions that people
>have offered in the past seem not to satisfy both points. For instance,
>that I can tell, "\a" or curses.beep() doesn't give you control over
>the frequency or duration.  I also looked at wxWindows but there were
>warnings about the MMedia module ("status is unclear") that made me
>leery.
>
for windows, I think it's
    http://docs.python.org/lib/module-winsound.html
but I don't know if there's a corresponding *nix module.
Or maybe you can make one just writing to some /dev/somethingorother,
and conditionally set up the appropriate thing for limited
platform-appropriateness if not independence.

Regards,
Bengt Richter



More information about the Python-list mailing list