Sound Alarm When Program Execution Completes in Python

Often one faces a situation where your code takes extremely long to run and you don’t want to be staring at it all the time but want to know when it is done.

In engineering analysis, simulation take a long time to run and the python driver program take a long time to finish and I face this problem a lot.

A simple solution is adding a beep at the end, here’s how to do it in python.

def beep():
    print "\a"

beep()

works on windows/ linux/mac without any modification.

via here

2 thoughts on “Sound Alarm When Program Execution Completes in Python

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s