[Tutor] Python Access to Computer speaker

Tim Peters tim.one@home.com
Sun, 18 Feb 2001 21:06:38 -0500

[Tim Johnson]
> 	Does Python have a function to access for the computer
> speaker for frequency and duration?
> .....like the the "C" sound() function.

[Danny Yoo]
> I'll assume that you're working on a Windows system for the moment.
> There's a module called winsound that'll let you do this:
>     http://www.python.org/doc/current/lib/module-winsound.html
> In it, there's a function called Beep(), and it does take in frequency
> and duration.

This is a case where you really need to use the development docs:


They point out that-- alas --Beep()'s arguments are ignored except under
Windows NT and 2000.  Under 95 and 98, Windows doesn't supply anything "that
works".  Unsure about Windows ME.

Note that standard C doesn't have a "sound" function -- that must be
specific to some particular vendor-extended C you used.

no-good-news-here!-ly y'rs  - tim