Module Expr Str ImportFrom alias ImportFrom alias Import alias Import alias Import alias Import alias Import alias Import alias TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body ImportFrom alias Import alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias alias alias alias alias alias ImportFrom alias alias ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body Expr Str Assign NameStore Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign NameStore Call NameLoad Str Assign NameStore Call NameLoad keyword Str FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad NameLoad decorator_list Assign NameStore Call NameLoad Assign NameStore Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr NameLoad decorator_list Assign NameStore Call NameLoad AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad If CompareEq NameLoad Str body Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Return AttributeLoad NameLoad attr decorator_list NameLoad Assign NameStore Call NameLoad Call NameLoad keyword NameLoad keyword Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Call AttributeLoad NameLoad attr Str decorator_list FunctionDef arguments args NameParam defaults body Return CompareIn AttributeLoad NameLoad attr Set Str Str Str decorator_list NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad NameLoad keyword NameLoad keyword Str FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam defaults body Pass decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Str body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str Assign NameStore Dict Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore BoolOpOr NameLoad ListLoad If AttributeLoad NameLoad attr body Assign NameStore BinOpAdd AttributeLoad NameLoad attr NameLoad orelse Assign NameStore BinOpAdd AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str FunctionDef arguments args NameParam defaults body Expr Str Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Num Call AttributeLoad NameLoad attr decorator_list Return ListComp Call AttributeLoad NameLoad attr NameLoad NameLoad comprehension NameStore NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults kwarg body Expr Str Return Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore AttributeLoad NameLoad attr attr Num decorator_list FunctionDef arguments args NameParam defaults body If CompareIs AttributeLoad NameLoad attr NameLoad body Return Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults kwarg body Expr Str If BoolOpAnd CompareEq AttributeLoad NameLoad attr Str UnaryOpNot Call NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad BinOpMod Str Call NameLoad Expr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Str ListLoad Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr Str NameLoad If UnaryOpNot AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr BoolOpOr AttributeLoad AttributeLoad NameLoad attr attr Dict Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Str keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Expr Str For NameStore Call NameLoad Call NameLoad BinOpDiv NameLoad NameLoad body If Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Break orelse If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr If NameLoad body Expr Call AttributeLoad NameLoad attr orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword UnaryOpNot NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad kwarg body Expr Str If CompareIs AttributeLoad NameLoad attr NameLoad body Raise Call NameLoad Str orelse Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return CompareIsNot AttributeLoad NameLoad attr NameLoad decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr Str body If CompareNotEq AttributeLoad NameLoad attr Num body Raise orelse ImportFrom alias If CompareNotEq AttributeLoad NameLoad attr NameLoad body Raise Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body If CompareEq AttributeLoad NameLoad attr Str body ImportFrom alias Expr Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr orelse Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If AttributeLoad NameLoad attr body If BoolOpAnd Call NameLoad NameLoad Str Call NameLoad NameLoad Str body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Return handlers ExceptHandler type NameLoad body Pass Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam defaults body Expr Str If AttributeLoad NameLoad attr body If CompareIs Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad body Return NameLoad orelse Return NameLoad orelse Return NameLoad decorator_list decorator_list Expr Call AttributeLoad NameLoad attr NameLoad FunctionDef arguments args NameParam NameParam defaults Num Str kwarg body Expr Str Assign NameStore Call NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr TryExcept body Expr Call AttributeLoad NameLoad attr keyword NameLoad handlers ExceptHandler type NameLoad body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Raise Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args defaults kwarg body Expr Str Assign TupleStore NameStore NameStore Call NameLoad NameLoad TryFinally body Expr Yield NameLoad finalbody Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad decorator_list NameLoad
N/A N/A Base class to manage a running kernel __future__ absolute_import contextlib contextmanager N/A os N/A re N/A signal N/A sys N/A time N/A warnings N/A N/A queue Empty N/A N/A N/A ImportError N/A Queue Empty N/A zmq ipython_genutils.importstring import_item localinterfaces is_local_ip local_ips traitlets Any Instance Unicode List Bool Type DottedObjectName jupyter_client launch_kernel kernelspec connect ConnectionFileMixin session Session managerabc KernelManagerABC KernelManager N/A ConnectionFileMixin N/A N/A Manages a single kernel in a subprocess on this host.

    This version starts kernels with Popen.
     N/A context N/A Instance N/A zmq Context _context_default N/A N/A self N/A N/A N/A N/A N/A N/A zmq Context instance N/A N/A client_class N/A DottedObjectName jupyter_client.blocking.BlockingKernelClient N/A client_factory N/A Type klass jupyter_client.KernelClient _client_factory_default N/A N/A self N/A N/A N/A N/A import_item N/A self client_class N/A _client_class_changed N/A N/A self name old new N/A N/A N/A N/A self client_factory N/A import_item N/A str new N/A N/A kernel N/A Any N/A kernel_spec_manager N/A Instance N/A kernelspec KernelSpecManager _kernel_spec_manager_default N/A N/A self N/A N/A N/A N/A N/A kernelspec KernelSpecManager data_dir N/A self data_dir N/A _kernel_spec_manager_changed N/A N/A self N/A N/A N/A N/A self _kernel_spec None N/A N/A kernel_name N/A Unicode N/A kernelspec NATIVE_KERNEL_NAME _kernel_name_changed N/A N/A self name old new N/A N/A N/A N/A self _kernel_spec None N/A N/A new python N/A N/A N/A self kernel_name N/A kernelspec NATIVE_KERNEL_NAME N/A N/A _kernel_spec None kernel_spec N/A N/A self N/A N/A N/A N/A N/A self _kernel_spec None N/A N/A N/A self _kernel_spec N/A N/A N/A self kernel_spec_manager get_kernel_spec N/A self kernel_name N/A N/A self _kernel_spec N/A property N/A kernel_cmd N/A List N/A Unicode config True help DEPRECATED: Use kernel_name instead.

        The Popen Command to launch the kernel.
        Override this if you have a custom kernel.
        If kernel_cmd is specified in a configuration file,
        Jupyter does not pass any arguments to the kernel,
        because it cannot make any assumptions about the
        arguments that the kernel understands. In particular,
        this means that the kernel does not receive the
        option --debug if it given on the Jupyter command line.
         _kernel_cmd_changed N/A N/A self name old new N/A N/A N/A N/A N/A warnings warn Setting kernel_cmd is deprecated, use kernel_spec to start different kernels. N/A ipykernel N/A N/A self N/A N/A N/A N/A N/A self kernel_name N/A python python2 python3 N/A property N/A _launch_args N/A Any N/A _control_socket N/A Any N/A _restarter N/A Any N/A autorestart N/A Bool True config True help Should we autorestart the kernel if it dies. __del__ N/A N/A self N/A N/A N/A N/A N/A self _close_control_socket N/A N/A N/A self cleanup_connection_file N/A start_restarter N/A N/A self N/A N/A N/A N/A stop_restarter N/A N/A self N/A N/A N/A N/A add_restart_callback N/A N/A self callback event N/A restart N/A N/A register a callback to be called when a kernel is restarted N/A N/A N/A self _restarter None N/A N/A N/A N/A N/A N/A self _restarter add_callback callback event N/A remove_restart_callback N/A N/A self callback event N/A restart N/A N/A unregister a callback to be called when a kernel is restarted N/A N/A N/A self _restarter None N/A N/A N/A N/A N/A N/A self _restarter remove_callback callback event N/A client N/A N/A self N/A kwargs N/A N/A Create a client configured to connect to our kernel N/A kw N/A N/A N/A N/A kw update N/A N/A self get_connection_info session True N/A N/A N/A kw update N/A dict connection_file N/A self connection_file parent self N/A N/A N/A kw update kwargs N/A N/A N/A self client_factory kw N/A format_kernel_cmd N/A N/A self extra_arguments N/A None N/A N/A replace templated args (e.g. {connection_file}) N/A extra_arguments N/A extra_arguments N/A N/A N/A self kernel_cmd N/A N/A cmd N/A N/A self kernel_cmd extra_arguments N/A N/A cmd N/A N/A N/A self kernel_spec argv extra_arguments N/A ns N/A dict connection_file N/A self connection_file prefix N/A sys prefix N/A N/A N/A ns update N/A self _launch_args N/A pat N/A N/A re compile \{([A-Za-z0-9_]+)\} from_ns N/A N/A match N/A N/A N/A Get the key out of ns if it's there, otherwise no change. N/A N/A N/A ns get N/A N/A match group 1 N/A N/A match group N/A N/A N/A N/A N/A pat sub from_ns arg N/A arg cmd N/A _launch_kernel N/A N/A self kernel_cmd N/A kw N/A N/A actually launch the kernel

        override in a subclass to launch kernel subprocesses differently
         N/A N/A launch_kernel kernel_cmd kw N/A _connect_control_socket N/A N/A self N/A N/A N/A N/A N/A self _control_socket None N/A N/A N/A self _control_socket N/A N/A self connect_control N/A N/A N/A self _control_socket linger 100 N/A _close_control_socket N/A N/A self N/A N/A N/A N/A N/A self _control_socket None N/A N/A N/A N/A N/A N/A self _control_socket close N/A N/A self _control_socket None N/A start_kernel N/A N/A self N/A kw N/A N/A Starts a kernel on this host in a separate process.

        If random ports (port=0) are being used, this method must be called
        before the channels are created.

        Parameters
        ----------
        `**kw` : optional
             keyword arguments that are passed down to build the kernel_cmd
             and launching the kernel (e.g. Popen kwargs).
         N/A N/A N/A N/A self transport tcp N/A N/A is_local_ip N/A self ip N/A N/A N/A RuntimeError N/A Can only launch a kernel on a local interface. Make sure that the '*_address' attributes are configured properly. Currently valid addresses are: %s N/A local_ips N/A N/A N/A self write_connection_file N/A N/A self _launch_args N/A N/A kw copy N/A extra_arguments N/A N/A kw pop extra_arguments N/A N/A kernel_cmd N/A N/A self format_kernel_cmd extra_arguments extra_arguments N/A env N/A N/A N/A N/A kw pop env N/A os environ copy N/A N/A N/A env pop PYTHONEXECUTABLE None N/A N/A N/A self kernel_cmd N/A N/A N/A N/A env update N/A N/A N/A self kernel_spec env N/A N/A N/A N/A N/A self log debug Starting kernel: %s kernel_cmd N/A N/A self kernel N/A N/A self _launch_kernel kernel_cmd env env kw N/A N/A N/A self start_restarter N/A N/A N/A self _connect_control_socket N/A request_shutdown N/A N/A self restart N/A False N/A N/A Send a shutdown request via control channel
         N/A content N/A dict restart restart N/A msg N/A N/A N/A self session msg shutdown_request content content N/A N/A N/A N/A self session send N/A self _control_socket msg N/A finish_shutdown N/A N/A self waittime pollinterval N/A 1 0.1 N/A N/A Wait for kernel shutdown, then kill process if it doesn't shutdown.

        This does not send shutdown requests - use :meth:`request_shutdown`
        first.
         N/A i N/A range N/A int N/A waittime pollinterval N/A N/A N/A N/A self is_alive N/A N/A N/A N/A time sleep pollinterval N/A N/A N/A N/A N/A self has_kernel N/A N/A N/A N/A self _kill_kernel N/A cleanup N/A N/A self connection_file N/A True N/A N/A Clean up resources when the kernel is shut down N/A connection_file N/A N/A N/A N/A self cleanup_connection_file N/A N/A N/A self cleanup_ipc_files N/A N/A N/A self _close_control_socket N/A shutdown_kernel N/A N/A self now restart N/A False False N/A N/A Attempts to the stop the kernel process cleanly.

        This attempts to shutdown the kernels cleanly by:

        1. Sending it a shutdown message over the shell channel.
        2. If that fails, the kernel is shutdown forcibly by sending it
           a signal.

        Parameters
        ----------
        now : bool
            Should the kernel be forcible killed *now*. This skips the
            first, nice shutdown attempt.
        restart: bool
            Will this kernel be restarted after it is shutdown. When this
            is True, connection files will not be cleaned up.
         N/A N/A N/A self stop_restarter N/A now N/A N/A N/A N/A self _kill_kernel N/A N/A N/A N/A self request_shutdown restart restart N/A N/A N/A self finish_shutdown N/A N/A N/A self cleanup connection_file N/A restart N/A restart_kernel N/A N/A self now N/A False kw N/A N/A Restarts a kernel with the arguments that were used to launch it.

        If the old kernel was launched with random ports, the same ports will be
        used for the new kernel. The same connection file is used again.

        Parameters
        ----------
        now : bool, optional
            If True, the kernel is forcefully restarted *immediately*, without
            having a chance to do any cleanup action.  Otherwise the kernel is
            given 1s to clean up before a forceful restart is issued.

            In all cases the kernel is restarted, the only difference is whether
            it is given a chance to perform a clean shutdown or not.

        `**kw` : optional
            Any options specified here will overwrite those used to launch the
            kernel.
         N/A N/A N/A self _launch_args None N/A N/A N/A RuntimeError Cannot restart the kernel. No previous call to 'start_kernel'. N/A N/A N/A N/A self shutdown_kernel now now restart True N/A N/A N/A N/A self _launch_args update kw N/A N/A N/A self start_kernel N/A self _launch_args N/A has_kernel N/A N/A self N/A N/A N/A Has a kernel been started that we are managing. N/A N/A N/A self kernel None N/A property _kill_kernel N/A N/A self N/A N/A N/A Kill the running kernel.

        This is a private method, callers should use shutdown_kernel(now=True).
         N/A N/A self has_kernel N/A N/A N/A N/A N/A N/A N/A self kernel kill N/A N/A N/A OSError N/A e N/A N/A N/A N/A sys platform win32 N/A N/A N/A N/A e winerror 5 N/A N/A N/A errno ESRCH N/A N/A N/A e errno ESRCH N/A N/A N/A N/A N/A N/A self kernel wait N/A N/A self kernel None N/A N/A N/A RuntimeError Cannot kill kernel. No kernel is running! N/A interrupt_kernel N/A N/A self N/A N/A N/A Interrupts the kernel by sending it a signal.

        Unlike ``signal_kernel``, this operation is well supported on all
        platforms.
         N/A N/A self has_kernel N/A N/A N/A N/A sys platform win32 N/A win_interrupt send_interrupt N/A N/A send_interrupt N/A N/A self kernel win32_interrupt_event N/A N/A N/A N/A self signal_kernel N/A signal SIGINT N/A N/A N/A RuntimeError Cannot interrupt kernel. No kernel is running! N/A signal_kernel N/A N/A self signum N/A N/A N/A Sends a signal to the process group of the kernel (this
        usually includes the kernel and any subprocesses spawned by
        the kernel).

        Note that since only SIGTERM is supported on Windows, this function is
        only useful on Unix systems.
         N/A N/A self has_kernel N/A N/A N/A N/A hasattr os getpgid N/A hasattr os killpg N/A N/A N/A N/A pgid N/A N/A os getpgid N/A N/A self kernel pid N/A N/A N/A os killpg pgid signum N/A N/A N/A N/A OSError N/A N/A N/A N/A N/A N/A self kernel send_signal signum N/A N/A N/A RuntimeError Cannot signal kernel. No kernel is running! N/A is_alive N/A N/A self N/A N/A N/A Is the kernel process still running? N/A N/A self has_kernel N/A N/A N/A N/A N/A N/A self kernel poll None N/A N/A True N/A N/A False N/A N/A False N/A N/A N/A N/A N/A KernelManagerABC register KernelManager start_new_kernel N/A N/A startup_timeout kernel_name N/A 60 python kwargs N/A N/A Start a new kernel, and return its Manager and Client N/A km N/A KernelManager kernel_name kernel_name N/A N/A N/A km start_kernel kwargs N/A kc N/A N/A km client N/A N/A N/A kc start_channels N/A N/A N/A N/A N/A kc wait_for_ready timeout startup_timeout N/A N/A N/A RuntimeError N/A N/A N/A N/A kc stop_channels N/A N/A N/A km shutdown_kernel N/A N/A N/A km kc N/A run_kernel N/A N/A N/A kwargs N/A N/A Context manager to create a kernel in a subprocess.

    The kernel is shut down when the context exits.

    Returns
    -------
    kernel_client: connected KernelClient instance
     N/A N/A km kc N/A start_new_kernel kwargs N/A N/A N/A N/A kc N/A N/A N/A N/A kc stop_channels N/A N/A N/A km shutdown_kernel now True N/A contextmanager