20 December 2017

Signal Handling in Python

If you are system programmer, you would have heard about signals and probably would have done lots of coding using signal. It might also be a second nature to you. But when you started to get your hands dirty with signals especially in C, it might have been quite involved. Now moving to signal handling in Python

Recently (last week), there was a post from Python Module of the week on signals and I thought I would try it. Here is the code that does some signal handling. You might want to check the full post (BTW, it is very interesting one). I feel that it easy to write code (and beautiful too) and I was able to do C-equivalent code in less than 30 minutes (which means that Python makes us productive). Here is the script that I wrote. You can find in GIT Hub and feel free to play around.



No comments: