"John Salerno" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Ben Cartwright wrote: >> 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. > > I'd prefer to be platform neutral when possible. Is the first option > that, or does this change depending on OS?
It is display dependent what display does with control codes. \007 is ANSI ascii control char which only works to beep on ansi terminals or emulation thereof. On PCs and Windows, displays have extended char set that prints most all char codes. \007 prints as a square box. IBM EBCDIC terminals would probably do third thing. Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list