[Tutor] Python Access to Computer speaker

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


--PEIAKu/WMn1b1Hv9
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.

Peace,
  Kalle (from Sweden)
--=20
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

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

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

iD8DBQE6kGUWdNeA1787sd0RAkSiAJ9BYHLigWErMjQ+ktr2jQ71JbnCrACgiEDk
UNocLZDVLv9o/8b4u0bmv48=
=PDqM
-----END PGP SIGNATURE-----

--PEIAKu/WMn1b1Hv9--