##// END OF EJS Templates
add config file inheritance to kernelapp...
MinRK -
Show More
@@ -292,7 +292,8 b' class IPythonQtConsoleApp(BaseIPythonApplication):'
292 argv = sys.argv[1:]
292 argv = sys.argv[1:]
293
293
294 self.kernel_argv = list(argv) # copy
294 self.kernel_argv = list(argv) # copy
295
295 # kernel should inherit default config file from frontend
296 self.kernel_argv.append("KernelApp.parent_appname='%s'"%self.name)
296 # scrub frontend-specific flags
297 # scrub frontend-specific flags
297 for a in argv:
298 for a in argv:
298 if a.startswith('--') and a[2:] in qt_flags:
299 if a.startswith('--') and a[2:] in qt_flags:
@@ -82,7 +82,17 b' class KernelApp(BaseIPythonApplication):'
82 heartbeat = Instance(Heartbeat)
82 heartbeat = Instance(Heartbeat)
83 session = Instance('IPython.zmq.session.Session')
83 session = Instance('IPython.zmq.session.Session')
84 ports = Dict()
84 ports = Dict()
85
85
86 # inherit config file name from parent:
87 parent_appname = Unicode(config=True)
88 def _parent_appname_changed(self, name, old, new):
89 if self.config_file_specified:
90 # it was manually specified, ignore
91 return
92 self.config_file_name = new.replace('-','_') + u'_config.py'
93 # don't let this count as specifying the config file
94 self.config_file_specified = False
95
86 # connection info:
96 # connection info:
87 ip = Unicode(LOCALHOST, config=True,
97 ip = Unicode(LOCALHOST, config=True,
88 help="Set the IP or interface on which the kernel will listen.")
98 help="Set the IP or interface on which the kernel will listen.")
General Comments 0
You need to be logged in to leave comments. Login now