##// END OF EJS Templates
Application.launch_instance...
MinRK -
Show More
@@ -524,8 +524,11 b' class Application(SingletonConfigurable):'
524 sys.exit(exit_status)
524 sys.exit(exit_status)
525
525
526 @classmethod
526 @classmethod
527 def launch_new_instance(cls, argv=None, **kwargs):
527 def launch_instance(cls, argv=None, **kwargs):
528 """Launch a global instance of this Application"""
528 """Launch a global instance of this Application
529
530 If a global instance already exists, this reinitializes and starts it
531 """
529 app = cls.instance(**kwargs)
532 app = cls.instance(**kwargs)
530 app.initialize(argv)
533 app.initialize(argv)
531 app.start()
534 app.start()
@@ -745,5 +745,5 b' class NotebookApp(BaseIPythonApplication):'
745 # Main entry point
745 # Main entry point
746 #-----------------------------------------------------------------------------
746 #-----------------------------------------------------------------------------
747
747
748 launch_new_instance = NotebookApp.launch_new_instance
748 launch_new_instance = NotebookApp.launch_instance
749
749
@@ -203,5 +203,5 b' class NbConvertApp(Application):'
203 # Main entry point
203 # Main entry point
204 #-----------------------------------------------------------------------------
204 #-----------------------------------------------------------------------------
205
205
206 launch_new_instance = NbConvertApp.launch_new_instance
206 launch_new_instance = NbConvertApp.launch_instance
207
207
@@ -608,7 +608,7 b' class IPClusterApp(BaseIPythonApplication):'
608 else:
608 else:
609 return self.subapp.start()
609 return self.subapp.start()
610
610
611 launch_new_instance = IPClusterApp.launch_new_instance
611 launch_new_instance = IPClusterApp.launch_instance
612
612
613 if __name__ == '__main__':
613 if __name__ == '__main__':
614 launch_new_instance()
614 launch_new_instance()
@@ -544,7 +544,7 b' def launch_new_instance(*args, **kwargs):'
544 if p.name != 'MainProcess':
544 if p.name != 'MainProcess':
545 # we are a subprocess, don't start another Controller!
545 # we are a subprocess, don't start another Controller!
546 return
546 return
547 return IPControllerApp.launch_new_instance(*args, **kwargs)
547 return IPControllerApp.launch_instance(*args, **kwargs)
548
548
549
549
550 if __name__ == '__main__':
550 if __name__ == '__main__':
@@ -388,7 +388,7 b' class IPEngineApp(BaseParallelApplication):'
388 self.log.critical("Engine Interrupted, shutting down...\n")
388 self.log.critical("Engine Interrupted, shutting down...\n")
389
389
390
390
391 launch_new_instance = IPEngineApp.launch_new_instance
391 launch_new_instance = IPEngineApp.launch_instance
392
392
393
393
394 if __name__ == '__main__':
394 if __name__ == '__main__':
@@ -91,7 +91,7 b' class IPLoggerApp(BaseParallelApplication):'
91 self.log.critical("Logging Interrupted, shutting down...\n")
91 self.log.critical("Logging Interrupted, shutting down...\n")
92
92
93
93
94 launch_new_instance = IPLoggerApp.launch_new_instance
94 launch_new_instance = IPLoggerApp.launch_instance
95
95
96
96
97 if __name__ == '__main__':
97 if __name__ == '__main__':
@@ -141,7 +141,7 b' class ZMQTerminalIPythonApp(TerminalIPythonApp, IPythonConsoleApp):'
141 pass
141 pass
142
142
143
143
144 launch_new_instance = ZMQTerminalIPythonApp.launch_new_instance
144 launch_new_instance = ZMQTerminalIPythonApp.launch_instance
145
145
146
146
147 if __name__ == '__main__':
147 if __name__ == '__main__':
@@ -389,7 +389,7 b' def load_default_config(ipython_dir=None):'
389 return config
389 return config
390
390
391
391
392 launch_new_instance = TerminalIPythonApp.launch_new_instance
392 launch_new_instance = TerminalIPythonApp.launch_instance
393
393
394
394
395 if __name__ == '__main__':
395 if __name__ == '__main__':
General Comments 0
You need to be logged in to leave comments. Login now