Catch KeyboardInterrupt silently

(also fix some stuff for PEP8)