beeping noise on windows

Peter Hansen peter at engcorp.com
Tue Jan 29 07:43:23 CET 2002


Greg Krohn wrote:
> 
> > back on my Apple II+ i could write the line
> > "print Ctrl-G"
> > and the computer would beep.  Is there a command as simple to make windows
> > beep for me? -- from python?
> 
> It works for me. Not in PythonWin, though. Just with the standard Python.
> It's ASCII 7, BTW. So "print chr(7)" will work, too.

For the record, this is normally interpreted only by the DOS prompt itself,
which is where stdout is meaningful.  And the regular escape "\a" is
an alias for that (ASCII name BEL for obvious reasons).

Try "echo ^G" (where you type the keystroke Ctrl-G to get that) at the
DOS prompt for the same effect.



More information about the Python-list mailing list