While I was writing a simple stopwatch script in python I came across a few hurdles. If you print out a line and don't include the ending carriage return it buffers the output. Sometimes this isn't what you want, and you have to flush the output buffer.
I also needed to figure out how to capture ctrl+c in python. If you hit ctrl+c while a python script is running you get a bunch of debug messages. Not what I wanted.
print signal, "was handled!"