(process)
Sends interrupt signal to process's PID.
Sends interrupt signal to process's PID.
Sends interrupt signal to process s PID .
def send_interrupt(process): 
    """
        Sends interrupt signal to process's PID. 
    """ 
    try:
        os.kill(process.pid, SIGINT) 
        # os.kill(process.pid, SIGTERM)
    except OSError: pass           # process cannot be killed
    except TypeError: pass         # pid is incorrect type
    except UnboundLocalError: pass # 'process' is not defined
    except AttributeError: pass
def send_interrupt ( process ) : try : os . kill ( process . pid , SIGINT ) # os.kill(process.pid, SIGTERM) except OSError : pass # process cannot be killed except TypeError : pass # pid is incorrect type except UnboundLocalError : pass # 'process' is not defined except AttributeError : pass