I was wondering how i catch various signals in nix python so i can exit my programs gracefully? also how might i start another application then have two way communication between it's shell and the python program that started it?