Пример #1
0
 def __init__(self, klass=SocketClient, **kwargs):
     assert (issubclass(klass, SocketClient))
     IPythonKernel.__init__(self, **kwargs)
     self.klass = klass
     self.client = None
     # self.execution_count doesn't update
     self.exe_count = 0
     self.magics = {
         "%connect": self.connect_magic,
         "%disconnect": lambda args: self.disconnect()
     }
Пример #2
0
 def __init__(self, **kwargs):
     IPythonKernel.__init__(self, **kwargs)
     self.log = _setup_logging()
     self.remote = None
     self.address = "localhost"
     self.clear_output = True
     self.last_result = ""
     # for do_handle
     self.pattern = re.compile("[$](.*?)[(](.*)[)]")
     self.commands = {
         'exec': '%s',
         'connect': 'self.connect_remote(%s)',
     }
     config_maixpy3()
Пример #3
0
    def __init__(self, **kwargs):
        IPythonKernel.__init__(self, **kwargs)
        self.log = _setup_logging()
        self.remote = None
        self.address = "localhost"
        self._media_client = None
        self.clear_output = True
        self._media_timer = None
        # for do_handle
        self.pattern = re.compile("[$](.*?)[(](.*)[)]")
        self.commands = {
            'exec': '%s',
            'connect': 'self.connect_remote(%s)',
        }

        self.do_reconnect()
Пример #4
0
 def __init__(self, klass=SocketClient, **kwargs):
     assert(issubclass(klass, SocketClient))
     IPythonKernel.__init__(self, **kwargs)
     self.klass = klass
     self.client = None
     # self.execution_count doesn't update
     self.exe_count = 0
     self.magics = {
         "%connect": self.connect_magic,
         "%disconnect": lambda args: self.client.disconnect(),
         "%exec_local": self.exec_local,
     }
     self.widgets = {
         "%trackball": lambda args: self.display_widget(TrackballWidget)
     }
     self.last_used_backend = None
     self.disconnect_callback = None
     self.widget_utils = None
Пример #5
0
 def __init__(self, **kwargs):
     Kernel.__init__(self, **kwargs)
     self.glif = Glif()
     self._unicode_latex_map = None  # for tab completion, will be loaded on demand
     self.myexecutioncount = 0  # IPythonKernel does it's own thing and overrides the
Пример #6
0
 def __init__(self, *args, **kwargs):
     IPythonKernel.__init__(self, *args, **kwargs)
     self.comm = self.parent.comm