##// END OF EJS Templates
zmq.Kernel: turn user_{module,ns} into traitlets
Scott Tsai -
Show More
@@ -70,6 +70,8 b' class Kernel(Configurable):'
70 iopub_socket = Instance('zmq.Socket')
70 iopub_socket = Instance('zmq.Socket')
71 stdin_socket = Instance('zmq.Socket')
71 stdin_socket = Instance('zmq.Socket')
72 log = Instance(logging.Logger)
72 log = Instance(logging.Logger)
73 user_module = Instance('types.ModuleType')
74 user_ns = Dict(default_value=None)
73
75
74 # Private interface
76 # Private interface
75
77
@@ -100,7 +102,7 b' class Kernel(Configurable):'
100
102
101
103
102
104
103 def __init__(self, user_module=None, user_ns=None, **kwargs):
105 def __init__(self, **kwargs):
104 super(Kernel, self).__init__(**kwargs)
106 super(Kernel, self).__init__(**kwargs)
105
107
106 # Before we even start up the shell, register *first* our exit handlers
108 # Before we even start up the shell, register *first* our exit handlers
@@ -110,8 +112,8 b' class Kernel(Configurable):'
110 # Initialize the InteractiveShell subclass
112 # Initialize the InteractiveShell subclass
111 self.shell = ZMQInteractiveShell.instance(config=self.config,
113 self.shell = ZMQInteractiveShell.instance(config=self.config,
112 profile_dir = self.profile_dir,
114 profile_dir = self.profile_dir,
113 user_module=user_module,
115 user_module = self.user_module,
114 user_ns=user_ns,
116 user_ns = self.user_ns,
115 )
117 )
116 self.shell.displayhook.session = self.session
118 self.shell.displayhook.session = self.session
117 self.shell.displayhook.pub_socket = self.iopub_socket
119 self.shell.displayhook.pub_socket = self.iopub_socket
General Comments 0
You need to be logged in to leave comments. Login now