I am creating a Python wrapper for a C-extension which is a driver for a sensor. I need to pass the Ctrl-C interrupt signal with Python to the driver so it ends the current acquisition phase and does not start a new one. I found these two related subjects : Allowing Ctrl-C to interrupt a python C-extension Allowing Ctrl-C to