##// END OF EJS Templates
remove references to removed pykernel and associated pure flag
MinRK -
Show More
@@ -140,8 +140,6 b' class IPythonConsoleApp(Configurable):'
140 140 frontend_flags = Any(app_flags)
141 141 frontend_aliases = Any(app_aliases)
142 142
143 pure = CBool(False, config=True,
144 help="Use a pure Python kernel instead of an IPython kernel.")
145 143 # create requested profiles by default, if they don't exist:
146 144 auto_create = CBool(True)
147 145 # connection info:
@@ -330,7 +328,6 b' class IPythonConsoleApp(Configurable):'
330 328 )
331 329 # start the kernel
332 330 if not self.existing:
333 kwargs = dict(ipython=not self.pure)
334 331 kwargs['extra_arguments'] = self.kernel_argv
335 332 self.kernel_manager.start_kernel(**kwargs)
336 333 elif self.sshserver:
@@ -101,9 +101,7 b' ipython qtconsole --pylab=inline # start with pylab in inline plotting mode'
101 101 # start with copy of flags
102 102 flags = dict(flags)
103 103 qt_flags = {
104 'pure' : ({'IPythonQtConsoleApp' : {'pure' : True}},
105 "Use a pure Python kernel instead of an IPython kernel."),
106 'plain' : ({'ConsoleWidget' : {'kind' : 'plain'}},
104 'plain' : ({'IPythonQtConsoleApp' : {'plain' : True}},
107 105 "Disable rich text support."),
108 106 }
109 107 qt_flags.update(boolean_flag(
@@ -180,18 +178,14 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
180 178 plain = CBool(False, config=True,
181 179 help="Use a plaintext widget instead of rich text (plain can't print/save).")
182 180
183 def _pure_changed(self, name, old, new):
184 kind = 'plain' if self.plain else 'rich'
181 def _plain_changed(self, name, old, new):
182 kind = 'plain' if new else 'rich'
185 183 self.config.ConsoleWidget.kind = kind
186 if self.pure:
187 self.widget_factory = FrontendWidget
188 elif self.plain:
184 if new:
189 185 self.widget_factory = IPythonWidget
190 186 else:
191 187 self.widget_factory = RichIPythonWidget
192 188
193 _plain_changed = _pure_changed
194
195 189 # the factory for creating a widget
196 190 widget_factory = Any(RichIPythonWidget)
197 191
@@ -210,7 +204,7 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
210 204 config=self.config,
211 205 )
212 206 # start the kernel
213 kwargs = dict(ipython=not self.pure)
207 kwargs = dict()
214 208 kwargs['extra_arguments'] = self.kernel_argv
215 209 kernel_manager.start_kernel(**kwargs)
216 210 kernel_manager.start_channels()
@@ -273,17 +267,13 b' class IPythonQtConsoleApp(BaseIPythonApplication, IPythonConsoleApp):'
273 267 self.window.add_tab_with_frontend(self.widget)
274 268 self.window.init_menu_bar()
275 269
276 self.window.setWindowTitle('Python' if self.pure else 'IPython')
270 self.window.setWindowTitle('IPython')
277 271
278 272 def init_colors(self, widget):
279 273 """Configure the coloring of the widget"""
280 274 # Note: This will be dramatically simplified when colors
281 275 # are removed from the backend.
282 276
283 if self.pure:
284 # only IPythonWidget supports styling
285 return
286
287 277 # parse the colors arg down to current known labels
288 278 try:
289 279 colors = self.config.ZMQInteractiveShell.colors
@@ -84,12 +84,12 b' kernel_flags.update(session_flags)'
84 84 #-----------------------------------------------------------------------------
85 85
86 86 class KernelApp(BaseIPythonApplication):
87 name='pykernel'
87 name='ipkernel'
88 88 aliases = Dict(kernel_aliases)
89 89 flags = Dict(kernel_flags)
90 90 classes = [Session]
91 91 # the kernel class, as an importstring
92 kernel_class = DottedObjectName('IPython.zmq.pykernel.Kernel')
92 kernel_class = DottedObjectName('IPython.zmq.ipkernel.Kernel')
93 93 kernel = Any()
94 94 poller = Any() # don't restrict this even though current pollers are all Threads
95 95 heartbeat = Instance(Heartbeat)
@@ -781,9 +781,6 b' class KernelManager(HasTraits):'
781 781
782 782 Parameters:
783 783 -----------
784 ipython : bool, optional (default True)
785 Whether to use an IPython kernel instead of a plain Python kernel.
786
787 784 launcher : callable, optional (default None)
788 785 A custom function for launching the kernel process (generally a
789 786 wrapper around ``entry_point.base_launch_kernel``). In most cases,
@@ -805,10 +802,7 b' class KernelManager(HasTraits):'
805 802 self._launch_args = kw.copy()
806 803 launch_kernel = kw.pop('launcher', None)
807 804 if launch_kernel is None:
808 if kw.pop('ipython', True):
809 from ipkernel import launch_kernel
810 else:
811 from pykernel import launch_kernel
805 from ipkernel import launch_kernel
812 806 self.kernel = launch_kernel(fname=self.connection_file, **kw)
813 807
814 808 def shutdown_kernel(self, restart=False):
General Comments 0
You need to be logged in to leave comments. Login now