diff --git a/IPython/frontend/qt/console/qtconsoleapp.py b/IPython/frontend/qt/console/qtconsoleapp.py index 126bd78..2d67b83 100644 --- a/IPython/frontend/qt/console/qtconsoleapp.py +++ b/IPython/frontend/qt/console/qtconsoleapp.py @@ -292,7 +292,8 @@ class IPythonQtConsoleApp(BaseIPythonApplication): argv = sys.argv[1:] self.kernel_argv = list(argv) # copy - + # kernel should inherit default config file from frontend + self.kernel_argv.append("KernelApp.parent_appname='%s'"%self.name) # scrub frontend-specific flags for a in argv: if a.startswith('--') and a[2:] in qt_flags: diff --git a/IPython/zmq/kernelapp.py b/IPython/zmq/kernelapp.py index 66f5bc9..f42c49c 100644 --- a/IPython/zmq/kernelapp.py +++ b/IPython/zmq/kernelapp.py @@ -82,7 +82,17 @@ class KernelApp(BaseIPythonApplication): heartbeat = Instance(Heartbeat) session = Instance('IPython.zmq.session.Session') ports = Dict() - + + # inherit config file name from parent: + parent_appname = Unicode(config=True) + def _parent_appname_changed(self, name, old, new): + if self.config_file_specified: + # it was manually specified, ignore + return + self.config_file_name = new.replace('-','_') + u'_config.py' + # don't let this count as specifying the config file + self.config_file_specified = False + # connection info: ip = Unicode(LOCALHOST, config=True, help="Set the IP or interface on which the kernel will listen.")