Beeping the console

Wojciech Mula wojciech_mula at poczta.null.onet.pl.invalid
Tue Aug 31 17:47:54 EDT 2004


Jeffrey Barish wrote:
> What is the easiest way to beep the console from a Python program (i.e.,
> to do the same thing as echo -e \a)?

import os
import sys

os.write(sys.stdout.fileno(), '\007')

w.



More information about the Python-list mailing list