def __init__(self, kernel_name, cwd=None):
        """
        Initialise a new kernel
        specify that matplotlib is inline and connect the stderr.
        Stores the active kernel process and its manager.
        """

        self.km, self.kc = start_new_kernel(
            kernel_name=kernel_name,
            stderr=open(os.devnull, 'w'),
            cwd=cwd,
        )

        self._ensure_iopub_up()
def __init__ ( self , kernel_name , cwd = None ) : self . km , self . kc = start_new_kernel ( kernel_name = kernel_name , stderr = open ( os . devnull , 'w' ) , cwd = cwd , ) self . _ensure_iopub_up ( )
Initialise a new kernel
        specify that matplotlib is inline and connect the stderr.
        Stores the active kernel process and its manager.