def kill(self, group=True):
        if mswindows:
            if group:
                winprocess.TerminateJobObject(self._job, 127)
            else:
                winprocess.TerminateProcess(self._handle, 127)
            self.returncode = 127    
        else:
            if group:
                os.killpg(self.pid, signal.SIGKILL)
            else:
                os.kill(self.pid, signal.SIGKILL)
            self.returncode = -9
Kill the process. If group=True, all sub-processes will also be killed.
dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/oldfrontend/process/killableprocess.py/Popen.kill