##// END OF EJS Templates
use launch_new_instance classmethod to launch apps
MinRK -
Show More
@@ -745,8 +745,5 b' class NotebookApp(BaseIPythonApplication):'
745 # Main entry point
745 # Main entry point
746 #-----------------------------------------------------------------------------
746 #-----------------------------------------------------------------------------
747
747
748 def launch_new_instance():
748 launch_new_instance = NotebookApp.launch_new_instance
749 app = NotebookApp.instance()
750 app.initialize()
751 app.start()
752
749
@@ -203,10 +203,5 b' class NbConvertApp(Application):'
203 # Main entry point
203 # Main entry point
204 #-----------------------------------------------------------------------------
204 #-----------------------------------------------------------------------------
205
205
206 def launch_new_instance():
206 launch_new_instance = NbConvertApp.launch_new_instance
207 """Application entry point"""
208
209 app = NbConvertApp.instance()
210 app.description = __doc__
211 app.start(argv=sys.argv)
212
207
@@ -608,12 +608,7 b' class IPClusterApp(BaseIPythonApplication):'
608 else:
608 else:
609 return self.subapp.start()
609 return self.subapp.start()
610
610
611 def launch_new_instance():
611 launch_new_instance = IPClusterApp.launch_new_instance
612 """Create and run the IPython cluster."""
613 app = IPClusterApp.instance()
614 app.initialize()
615 app.start()
616
617
612
618 if __name__ == '__main__':
613 if __name__ == '__main__':
619 launch_new_instance()
614 launch_new_instance()
@@ -528,8 +528,7 b' class IPControllerApp(BaseParallelApplication):'
528 self.cleanup_connection_files()
528 self.cleanup_connection_files()
529
529
530
530
531
531 def launch_new_instance(*args, **kwargs):
532 def launch_new_instance():
533 """Create and run the IPython controller"""
532 """Create and run the IPython controller"""
534 if sys.platform == 'win32':
533 if sys.platform == 'win32':
535 # make sure we don't get called from a multiprocessing subprocess
534 # make sure we don't get called from a multiprocessing subprocess
@@ -545,9 +544,7 b' def launch_new_instance():'
545 if p.name != 'MainProcess':
544 if p.name != 'MainProcess':
546 # we are a subprocess, don't start another Controller!
545 # we are a subprocess, don't start another Controller!
547 return
546 return
548 app = IPControllerApp.instance()
547 return IPControllerApp.launch_new_instance(*args, **kwargs)
549 app.initialize()
550 app.start()
551
548
552
549
553 if __name__ == '__main__':
550 if __name__ == '__main__':
@@ -388,11 +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 def launch_new_instance():
391 launch_new_instance = IPEngineApp.launch_new_instance
392 """Create and run the IPython engine"""
393 app = IPEngineApp.instance()
394 app.initialize()
395 app.start()
396
392
397
393
398 if __name__ == '__main__':
394 if __name__ == '__main__':
@@ -91,11 +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 def launch_new_instance():
94 launch_new_instance = IPLoggerApp.launch_new_instance
95 """Create and run the IPython LogWatcher"""
96 app = IPLoggerApp.instance()
97 app.initialize()
98 app.start()
99
95
100
96
101 if __name__ == '__main__':
97 if __name__ == '__main__':
@@ -140,11 +140,8 b' class ZMQTerminalIPythonApp(TerminalIPythonApp, IPythonConsoleApp):'
140 # no-op in the frontend, code gets run in the backend
140 # no-op in the frontend, code gets run in the backend
141 pass
141 pass
142
142
143 def launch_new_instance():
143
144 """Create and run a full blown IPython instance"""
144 launch_new_instance = ZMQTerminalIPythonApp.launch_new_instance
145 app = ZMQTerminalIPythonApp.instance()
146 app.initialize()
147 app.start()
148
145
149
146
150 if __name__ == '__main__':
147 if __name__ == '__main__':
@@ -389,11 +389,7 b' def load_default_config(ipython_dir=None):'
389 return config
389 return config
390
390
391
391
392 def launch_new_instance():
392 launch_new_instance = TerminalIPythonApp.launch_new_instance
393 """Create and run a full blown IPython instance"""
394 app = TerminalIPythonApp.instance()
395 app.initialize()
396 app.start()
397
393
398
394
399 if __name__ == '__main__':
395 if __name__ == '__main__':
General Comments 0
You need to be logged in to leave comments. Login now