[Tutor] Python Access to Computer speaker

Kalle Svensson kalle@gnupung.net
Mon, 19 Feb 2001 01:13:10 +0100

Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Sez Tim Johnson:
> Hi :
> 	Does Python have a function to access for the computer
> speaker for frequency and duration?

No, not generally.  On Windows NT, there is winsound.Beep(), but there is no
support on other platforms.  On GNU/Linux, you could use the 'beep' program
by Johnathan Nightingale: http://www.johnath.com/beep/.  You'll have to use
it through os.system, or wrap it in a python module.

> .....like the the "C" sound() function.

What library?  Platform?  Just curious.

  Kalle (from Sweden)
Email: kalle@gnupung.net     | You can tune a filesystem, but you
Web: http://www.gnupung.net/ | can't tune a fish. -- man tunefs(8)
PGP fingerprint: 0C56 B171 8159 327F 1824 F5DE 74D7 80D7 BF3B B1DD

Content-Type: application/pgp-signature
Content-Disposition: inline

Version: GnuPG v1.0.4 (GNU/Linux)
Comment: For info see http://www.gnupg.org