[ubuntu] Notify when a script crashes

view story

http://ubuntuforums.org – I normally have a home-made command line python script running in a terminal window at all times to log computer activity. Since I updated to ubuntu 12.04 there has been a lot of crashes (perhaps connected to compiz?). I don't mind waiting for bugs in ubuntu and compiz to be fixed, but in the meanwhile, is there a way to get notified when my script crashes so that I can start it up again? (Hardware)