[Tutor] Python Access to Computer speaker

Kalle Svensson kalle@gnupung.net
Mon, 19 Feb 2001 02:16:46 +0100


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

Sez Danny Yoo:
> On Sun, 18 Feb 2001, Tim Johnson wrote:
>=20
> > 	Does Python have a function to access for the computer
> > speaker for frequency and duration?
> > .....like the the "C" sound() function.
>=20
> I'll assume that you're working on a Windows system for the moment. =20
> There's a module called winsound that'll let you do this:
>=20
>     http://www.python.org/doc/current/lib/module-winsound.html
>=20
> In it, there's a function called Beep(), and it does take in frequency and
> duration.  However, I have to admit that I have no experience with it. =
=20
> Perhaps someone else on tutor's played around with it?

I haven't used it myself, but from reading comp.lang.python I have learned
that this doesn't work as advertised on Win95/98/ME systems.  On those
systems, it plays the windows bell sound, regardless of the parameters.

Peace,
  Kalle
--=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

--dkEUBIird37B8yKS
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

iD8DBQE6kHP+dNeA1787sd0RAg/ZAKCn9WmLWNZmO/CmVZ7z5xiPEEC35wCghXXA
LCq8wW7dlht3xnt1tia3XdA=
=C1I6
-----END PGP SIGNATURE-----

--dkEUBIird37B8yKS--