##// END OF EJS Templates
ConnectionFileMixin is a LoggingConfigurable
MinRK -
Show More
@@ -1,23 +1,12 b''
1 """Base class to manage the interaction with a running kernel
1 """Base class to manage the interaction with a running kernel"""
2 """
3
2
4 #-----------------------------------------------------------------------------
3 # Copyright (c) IPython Development Team.
5 # Copyright (C) 2013 The IPython Development Team
4 # Distributed under the terms of the Modified BSD License.
6 #
7 # Distributed under the terms of the BSD License. The full license is in
8 # the file COPYING, distributed as part of this software.
9 #-----------------------------------------------------------------------------
10
11 #-----------------------------------------------------------------------------
12 # Imports
13 #-----------------------------------------------------------------------------
14
5
15 from __future__ import absolute_import
6 from __future__ import absolute_import
16
7
17 import zmq
8 import zmq
18
9
19 # Local imports
20 from IPython.config.configurable import LoggingConfigurable
21 from IPython.utils.traitlets import (
10 from IPython.utils.traitlets import (
22 Any, Instance, Type,
11 Any, Instance, Type,
23 )
12 )
@@ -31,11 +20,7 b' from .clientabc import KernelClientABC'
31 from .connect import ConnectionFileMixin
20 from .connect import ConnectionFileMixin
32
21
33
22
34 #-----------------------------------------------------------------------------
23 class KernelClient(ConnectionFileMixin):
35 # Main kernel client class
36 #-----------------------------------------------------------------------------
37
38 class KernelClient(LoggingConfigurable, ConnectionFileMixin):
39 """Communicates with a single kernel on any host via zmq channels.
24 """Communicates with a single kernel on any host via zmq channels.
40
25
41 There are four channels associated with each kernel:
26 There are four channels associated with each kernel:
@@ -27,7 +27,7 b' import zmq'
27 from IPython.external.ssh import tunnel
27 from IPython.external.ssh import tunnel
28
28
29 # IPython imports
29 # IPython imports
30 from IPython.config import Configurable
30 from IPython.config import LoggingConfigurable
31 from IPython.core.profiledir import ProfileDir
31 from IPython.core.profiledir import ProfileDir
32 from IPython.utils.localinterfaces import localhost
32 from IPython.utils.localinterfaces import localhost
33 from IPython.utils.path import filefind, get_ipython_dir
33 from IPython.utils.path import filefind, get_ipython_dir
@@ -381,7 +381,7 b' channel_socket_types = {'
381
381
382 port_names = [ "%s_port" % channel for channel in ('shell', 'stdin', 'iopub', 'hb', 'control')]
382 port_names = [ "%s_port" % channel for channel in ('shell', 'stdin', 'iopub', 'hb', 'control')]
383
383
384 class ConnectionFileMixin(Configurable):
384 class ConnectionFileMixin(LoggingConfigurable):
385 """Mixin for configurable classes that work with connection files"""
385 """Mixin for configurable classes that work with connection files"""
386
386
387 # The addresses for the communication channels
387 # The addresses for the communication channels
@@ -5,7 +5,6 b''
5
5
6 from __future__ import absolute_import
6 from __future__ import absolute_import
7
7
8 # Standard library imports
9 import os
8 import os
10 import re
9 import re
11 import signal
10 import signal
@@ -15,8 +14,6 b' import warnings'
15
14
16 import zmq
15 import zmq
17
16
18 # Local imports
19 from IPython.config.configurable import LoggingConfigurable
20 from IPython.utils.importstring import import_item
17 from IPython.utils.importstring import import_item
21 from IPython.utils.localinterfaces import is_local_ip, local_ips
18 from IPython.utils.localinterfaces import is_local_ip, local_ips
22 from IPython.utils.path import get_ipython_dir
19 from IPython.utils.path import get_ipython_dir
@@ -35,7 +32,7 b' from .managerabc import ('
35 )
32 )
36
33
37
34
38 class KernelManager(LoggingConfigurable, ConnectionFileMixin):
35 class KernelManager(ConnectionFileMixin):
39 """Manages a single kernel in a subprocess on this host.
36 """Manages a single kernel in a subprocess on this host.
40
37
41 This version starts kernels with Popen.
38 This version starts kernels with Popen.
General Comments 0
You need to be logged in to leave comments. Login now