advice on this little script

Ben Cartwright bencvt at gmail.com
Wed Mar 8 23:37:31 EST 2006


BartlebyScrivener wrote:
> What about a console beep? How do you add that?
>
> rpd

Just use ASCII code 007 (BEL/BEEP):

  >>> import sys
  >>> sys.stdout.write('\007')

Or if you're on Windows, use the winsound standard module.

--Ben




More information about the Python-list mailing list