Format: application/x-python-code
1 o
2
3 �h�q � @ s~ d Z ddlmZ ddlZddlZddlZddlZddlZddlZddl Z ddl
4 Zddlm
5 Z
6 ddlmZmZ ddlmZ ddlmZ ddlZddlmZmZmZmZ dd lmZ dd
7 lmZmZmZ ddl m!Z! ddl"m#Z#m$Z$m%Z% dd
8 l&m'Z' ddl(m)Z) ddl*m+Z+m,Z,m-Z-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 ddl4m5Z5 ddl6m7Z7 ddl8m9Z9 ddl:m;Z;m<Z< ddl=m>Z> ddl?m@Z@ ddlAmBZB ddlCmDZD ddlEmFZFmGZG ddlHmIZI eJe�ZKeK�Ldddddd d!d"d#�� eJe�ZMeM�Ld$d%d&iid'fd$d(d&iid)fd$d*d+iid,fd-d.d/iid0fd1�� eK�Le� eM�Le� eK�Le$� eM�Le%� d2ZNG d3d$� d$eee!�ZOeOjPZQd4d5� ZReSd6k�r=eR� dS dS )7z%An Application for launching a kernel� )�annotationsN)�partial)�FileIO�
9 TextIOWrapper)�
10 StreamHandler)�Path)�BaseIPythonApplication�base_aliases�
11 base_flags�catch_config_error)�
12 ProfileDir)�InteractiveShellApp�
13 shell_aliases�shell_flags)�ConnectionFileMixin)�Session�session_aliases�
14 session_flags��jupyter_runtime_dir)�ioloop) �Any�Bool�Dict�DottedObjectName�Instance�Integer�Type�Unicode�default)�filefind)�import_item)� ZMQStream� )�get_connection_info�write_connection_file)�
15 ControlThread)� Heartbeat)�IOPubThread)�
16 IPythonKernel)�ParentPollerUnix�ParentPollerWindows)�ZMQInteractiveShellzIPKernelApp.ipzIPKernelApp.hb_portzIPKernelApp.shell_portzIPKernelApp.iopub_portzIPKernelApp.stdin_portzIPKernelApp.control_portzIPKernelApp.connection_filezIPKernelApp.transport)�ip�hb�shell�iopub�stdin�control�f� transport�IPKernelApp� no_stdoutT�"redirect stdout to the null device� no_stderr�"redirect stderr to the null device�pylab�autoz^Pre-load matplotlib and numpy for interactive use with
17 the default matplotlib backend.ZInteractiveShell� trio_loopFzEnable Trio as main event loop.)z no-stdoutz no-stderrr: z trio-loopa# NOTE: When using the `ipython kernel` entry point, Ctrl-C will not work.
18
19 To exit, you will have to explicitly quit this process, by either sending
20 "quit" from a client, or using Ctrl-\ in UNIX-like environments.
21
22 To read more about this, see https://github.com/ipython/ipython/issues/2049
23
24 c s� e Zd ZU dZdZee�Zee�Z e
25 eee
26 gZedddd�jdd�Ze� Ze� Zeedd �Ze� Zd
27 ed<