diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index 561edb5..50e10bf 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -745,8 +745,5 @@ class NotebookApp(BaseIPythonApplication): # Main entry point #----------------------------------------------------------------------------- -def launch_new_instance(): - app = NotebookApp.instance() - app.initialize() - app.start() +launch_new_instance = NotebookApp.launch_new_instance diff --git a/IPython/nbconvert/nbconvertapp.py b/IPython/nbconvert/nbconvertapp.py index 027f505..46008b4 100755 --- a/IPython/nbconvert/nbconvertapp.py +++ b/IPython/nbconvert/nbconvertapp.py @@ -203,10 +203,5 @@ class NbConvertApp(Application): # Main entry point #----------------------------------------------------------------------------- -def launch_new_instance(): - """Application entry point""" - - app = NbConvertApp.instance() - app.description = __doc__ - app.start(argv=sys.argv) +launch_new_instance = NbConvertApp.launch_new_instance diff --git a/IPython/parallel/apps/ipclusterapp.py b/IPython/parallel/apps/ipclusterapp.py index 65dc1bf..755fac3 100755 --- a/IPython/parallel/apps/ipclusterapp.py +++ b/IPython/parallel/apps/ipclusterapp.py @@ -608,12 +608,7 @@ class IPClusterApp(BaseIPythonApplication): else: return self.subapp.start() -def launch_new_instance(): - """Create and run the IPython cluster.""" - app = IPClusterApp.instance() - app.initialize() - app.start() - +launch_new_instance = IPClusterApp.launch_new_instance if __name__ == '__main__': launch_new_instance() diff --git a/IPython/parallel/apps/ipcontrollerapp.py b/IPython/parallel/apps/ipcontrollerapp.py index 68315b6..b820569 100755 --- a/IPython/parallel/apps/ipcontrollerapp.py +++ b/IPython/parallel/apps/ipcontrollerapp.py @@ -528,8 +528,7 @@ class IPControllerApp(BaseParallelApplication): self.cleanup_connection_files() - -def launch_new_instance(): +def launch_new_instance(*args, **kwargs): """Create and run the IPython controller""" if sys.platform == 'win32': # make sure we don't get called from a multiprocessing subprocess @@ -545,9 +544,7 @@ def launch_new_instance(): if p.name != 'MainProcess': # we are a subprocess, don't start another Controller! return - app = IPControllerApp.instance() - app.initialize() - app.start() + return IPControllerApp.launch_new_instance(*args, **kwargs) if __name__ == '__main__': diff --git a/IPython/parallel/apps/ipengineapp.py b/IPython/parallel/apps/ipengineapp.py index 50dad14..b937649 100755 --- a/IPython/parallel/apps/ipengineapp.py +++ b/IPython/parallel/apps/ipengineapp.py @@ -388,11 +388,7 @@ class IPEngineApp(BaseParallelApplication): self.log.critical("Engine Interrupted, shutting down...\n") -def launch_new_instance(): - """Create and run the IPython engine""" - app = IPEngineApp.instance() - app.initialize() - app.start() +launch_new_instance = IPEngineApp.launch_new_instance if __name__ == '__main__': diff --git a/IPython/parallel/apps/iploggerapp.py b/IPython/parallel/apps/iploggerapp.py index 3820af2..be1ab61 100755 --- a/IPython/parallel/apps/iploggerapp.py +++ b/IPython/parallel/apps/iploggerapp.py @@ -91,11 +91,7 @@ class IPLoggerApp(BaseParallelApplication): self.log.critical("Logging Interrupted, shutting down...\n") -def launch_new_instance(): - """Create and run the IPython LogWatcher""" - app = IPLoggerApp.instance() - app.initialize() - app.start() +launch_new_instance = IPLoggerApp.launch_new_instance if __name__ == '__main__': diff --git a/IPython/terminal/console/app.py b/IPython/terminal/console/app.py index 9023a4f..3ad504e 100644 --- a/IPython/terminal/console/app.py +++ b/IPython/terminal/console/app.py @@ -140,11 +140,8 @@ class ZMQTerminalIPythonApp(TerminalIPythonApp, IPythonConsoleApp): # no-op in the frontend, code gets run in the backend pass -def launch_new_instance(): - """Create and run a full blown IPython instance""" - app = ZMQTerminalIPythonApp.instance() - app.initialize() - app.start() + +launch_new_instance = ZMQTerminalIPythonApp.launch_new_instance if __name__ == '__main__': diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 642713e..3bea16f 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -389,11 +389,7 @@ def load_default_config(ipython_dir=None): return config -def launch_new_instance(): - """Create and run a full blown IPython instance""" - app = TerminalIPythonApp.instance() - app.initialize() - app.start() +launch_new_instance = TerminalIPythonApp.launch_new_instance if __name__ == '__main__':