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