If you're on a Unix terminal, you can print "a" to get a terminal bell:
>>> def beep():
... print "a"
>>> beep()
Of course, that will print a newline too… So sys.stdout.write("a")
might be better. But you get the idea.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…