##// END OF EJS Templates
Stripping notebook server flags from kernel's argv.
Brian E. Granger -
Show More
@@ -120,6 +120,9 b' aliases.update({'
120 'notebook-dir': 'NotebookManager.notebook_dir'
120 'notebook-dir': 'NotebookManager.notebook_dir'
121 })
121 })
122
122
123 notebook_aliases = [u'port', u'ip', u'keyfile', u'certfile', u'ws-hostname',
124 u'notebook-dir']
125
123 #-----------------------------------------------------------------------------
126 #-----------------------------------------------------------------------------
124 # IPythonNotebookApp
127 # IPythonNotebookApp
125 #-----------------------------------------------------------------------------
128 #-----------------------------------------------------------------------------
@@ -197,6 +200,12 b' class IPythonNotebookApp(BaseIPythonApplication):'
197 for a in argv:
200 for a in argv:
198 if a.startswith('-') and a.lstrip('-') in notebook_flags:
201 if a.startswith('-') and a.lstrip('-') in notebook_flags:
199 self.kernel_argv.remove(a)
202 self.kernel_argv.remove(a)
203 for a in argv:
204 if a.startswith('-'):
205 alias = a.lstrip('-').split('=')[0]
206 if alias in notebook_aliases:
207 self.kernel_argv.remove(a)
208 print self.kernel_argv
200
209
201 def init_configurables(self):
210 def init_configurables(self):
202 # Don't let Qt or ZMQ swallow KeyboardInterupts.
211 # Don't let Qt or ZMQ swallow KeyboardInterupts.
General Comments 0
You need to be logged in to leave comments. Login now