##// END OF EJS Templates
Special cased kernel name is 'python', not 'native'
Thomas Kluyver -
Show More
@@ -175,7 +175,7 b' class IPythonConsoleApp(ConnectionFileMixin):'
175 existing = CUnicode('', config=True,
175 existing = CUnicode('', config=True,
176 help="""Connect to an already running kernel""")
176 help="""Connect to an already running kernel""")
177
177
178 kernel_name = Unicode('native', config=True,
178 kernel_name = Unicode('python', config=True,
179 help="""The name of the default kernel to start.""")
179 help="""The name of the default kernel to start.""")
180
180
181 confirm_exit = CBool(True, config=True,
181 confirm_exit = CBool(True, config=True,
@@ -105,7 +105,7 b' def get_kernel_spec(kernel_name):'
105
105
106 Raises KeyError if the given kernel name is not found.
106 Raises KeyError if the given kernel name is not found.
107 """
107 """
108 if kernel_name == 'native':
108 if kernel_name == 'python':
109 kernel_name = NATIVE_KERNEL_NAME
109 kernel_name = NATIVE_KERNEL_NAME
110 d = find_kernel_specs()
110 d = find_kernel_specs()
111 resource_dir = d[kernel_name.lower()]
111 resource_dir = d[kernel_name.lower()]
@@ -70,7 +70,7 b' class KernelManager(LoggingConfigurable, ConnectionFileMixin):'
70 # generally a Popen instance
70 # generally a Popen instance
71 kernel = Any()
71 kernel = Any()
72
72
73 kernel_name = Unicode('native')
73 kernel_name = Unicode('python')
74
74
75 kernel_spec = Instance(kernelspec.KernelSpec)
75 kernel_spec = Instance(kernelspec.KernelSpec)
76
76
@@ -79,7 +79,7 b' class KernelManager(LoggingConfigurable, ConnectionFileMixin):'
79
79
80 def _kernel_name_changed(self, name, old, new):
80 def _kernel_name_changed(self, name, old, new):
81 self.kernel_spec = kernelspec.get_kernel_spec(new)
81 self.kernel_spec = kernelspec.get_kernel_spec(new)
82 self.ipython_kernel = new in {'native', 'python2', 'python3'}
82 self.ipython_kernel = new in {'python', 'python2', 'python3'}
83
83
84 kernel_cmd = List(Unicode, config=True,
84 kernel_cmd = List(Unicode, config=True,
85 help="""DEPRECATED: Use kernel_name instead.
85 help="""DEPRECATED: Use kernel_name instead.
@@ -167,7 +167,7 b' class KernelManager(LoggingConfigurable, ConnectionFileMixin):'
167 """replace templated args (e.g. {connection_file})"""
167 """replace templated args (e.g. {connection_file})"""
168 if self.kernel_cmd:
168 if self.kernel_cmd:
169 cmd = self.kernel_cmd
169 cmd = self.kernel_cmd
170 elif self.kernel_name == 'native':
170 elif self.kernel_name == 'python':
171 # The native kernel gets special handling
171 # The native kernel gets special handling
172 cmd = make_ipkernel_cmd(
172 cmd = make_ipkernel_cmd(
173 'from IPython.kernel.zmq.kernelapp import main; main()',
173 'from IPython.kernel.zmq.kernelapp import main; main()',
General Comments 0
You need to be logged in to leave comments. Login now