class_docstr: Manages a single kernel in a subprocess on this host.
  
  This version starts kernels with Popen.
class_docstr_tok: ["Manages","a","single","kernel","in","a","subprocess","on","this","host",".","This","version","starts","kernels","with","Popen","."]
docstr: Interrupts the kernel by sending it a signal.
  
  Unlike ``signal_kernel``, this operation is well supported on all
  platforms.
docstr_tok: ["Interrupts","the","kernel","by","sending","it","a","signal",".","Unlike","``","signal_kernel","``",",","this","operation","is","well","supported","on","all","platforms","."]
code: def interrupt_kernel(self):
      """Interrupts the kernel by sending it a signal.
  
      Unlike ``signal_kernel``, this operation is well supported on all
      platforms.
      """
      if self.has_kernel:
          interrupt_mode = self.kernel_spec.interrupt_mode
          if interrupt_mode == "signal":
              if sys.platform == "win32":
                  from .win_interrupt import send_interrupt
  
                  send_interrupt(self.kernel.win32_interrupt_event)
              else:
                  self.signal_kernel(signal.SIGINT)
  
          elif interrupt_mode == "message":
              msg = self.session.msg("interrupt_request", content={})
              self._connect_control_socket()
              self.session.send(self._control_socket, msg)
      else:
          raise RuntimeError(
              "Cannot interrupt kernel. No kernel is running!"
          )
  
imports: from __future__ import absolute_import
  from contextlib import contextmanager
  import os
  import re
  import signal
  import sys
  import time
  import warnings
  import zmq
  from ipython_genutils.importstring import import_item
  from .localinterfaces import is_local_ip, local_ips
  from traitlets import Any, Float, Instance, Unicode, List, Bool, Type, DottedObjectName
  from jupyter_client import launch_kernel, kernelspec
  from .connect import ConnectionFileMixin
  from .managerabc import KernelManagerABC
label_desc: Use image node_id 28 for calling the KernelManager obj's underlying member method code with example usage: obj.interrupt_kernel() without return types