diff --git a/IPython/config/application.py b/IPython/config/application.py index 73b157f..ccc1445 100644 --- a/IPython/config/application.py +++ b/IPython/config/application.py @@ -524,8 +524,11 @@ class Application(SingletonConfigurable): sys.exit(exit_status) @classmethod - def launch_new_instance(cls, argv=None, **kwargs): - """Launch a global instance of this Application""" + def launch_instance(cls, argv=None, **kwargs): + """Launch a global instance of this Application + + If a global instance already exists, this reinitializes and starts it + """ app = cls.instance(**kwargs) app.initialize(argv) app.start() diff --git a/IPython/html/notebookapp.py b/IPython/html/notebookapp.py index 50e10bf..f0cf67d 100644 --- a/IPython/html/notebookapp.py +++ b/IPython/html/notebookapp.py @@ -745,5 +745,5 @@ class NotebookApp(BaseIPythonApplication): # Main entry point #----------------------------------------------------------------------------- -launch_new_instance = NotebookApp.launch_new_instance +launch_new_instance = NotebookApp.launch_instance diff --git a/IPython/nbconvert/nbconvertapp.py b/IPython/nbconvert/nbconvertapp.py index 46008b4..38dabbd 100755 --- a/IPython/nbconvert/nbconvertapp.py +++ b/IPython/nbconvert/nbconvertapp.py @@ -203,5 +203,5 @@ class NbConvertApp(Application): # Main entry point #----------------------------------------------------------------------------- -launch_new_instance = NbConvertApp.launch_new_instance +launch_new_instance = NbConvertApp.launch_instance diff --git a/IPython/parallel/apps/ipclusterapp.py b/IPython/parallel/apps/ipclusterapp.py index 755fac3..8c416dc 100755 --- a/IPython/parallel/apps/ipclusterapp.py +++ b/IPython/parallel/apps/ipclusterapp.py @@ -608,7 +608,7 @@ class IPClusterApp(BaseIPythonApplication): else: return self.subapp.start() -launch_new_instance = IPClusterApp.launch_new_instance +launch_new_instance = IPClusterApp.launch_instance if __name__ == '__main__': launch_new_instance() diff --git a/IPython/parallel/apps/ipcontrollerapp.py b/IPython/parallel/apps/ipcontrollerapp.py index b820569..f141b37 100755 --- a/IPython/parallel/apps/ipcontrollerapp.py +++ b/IPython/parallel/apps/ipcontrollerapp.py @@ -544,7 +544,7 @@ def launch_new_instance(*args, **kwargs): if p.name != 'MainProcess': # we are a subprocess, don't start another Controller! return - return IPControllerApp.launch_new_instance(*args, **kwargs) + return IPControllerApp.launch_instance(*args, **kwargs) if __name__ == '__main__': diff --git a/IPython/parallel/apps/ipengineapp.py b/IPython/parallel/apps/ipengineapp.py index b937649..924aaaa 100755 --- a/IPython/parallel/apps/ipengineapp.py +++ b/IPython/parallel/apps/ipengineapp.py @@ -388,7 +388,7 @@ class IPEngineApp(BaseParallelApplication): self.log.critical("Engine Interrupted, shutting down...\n") -launch_new_instance = IPEngineApp.launch_new_instance +launch_new_instance = IPEngineApp.launch_instance if __name__ == '__main__': diff --git a/IPython/parallel/apps/iploggerapp.py b/IPython/parallel/apps/iploggerapp.py index be1ab61..cd7f4cf 100755 --- a/IPython/parallel/apps/iploggerapp.py +++ b/IPython/parallel/apps/iploggerapp.py @@ -91,7 +91,7 @@ class IPLoggerApp(BaseParallelApplication): self.log.critical("Logging Interrupted, shutting down...\n") -launch_new_instance = IPLoggerApp.launch_new_instance +launch_new_instance = IPLoggerApp.launch_instance if __name__ == '__main__': diff --git a/IPython/terminal/console/app.py b/IPython/terminal/console/app.py index 3ad504e..3439873 100644 --- a/IPython/terminal/console/app.py +++ b/IPython/terminal/console/app.py @@ -141,7 +141,7 @@ class ZMQTerminalIPythonApp(TerminalIPythonApp, IPythonConsoleApp): pass -launch_new_instance = ZMQTerminalIPythonApp.launch_new_instance +launch_new_instance = ZMQTerminalIPythonApp.launch_instance if __name__ == '__main__': diff --git a/IPython/terminal/ipapp.py b/IPython/terminal/ipapp.py index 3bea16f..7c1bd47 100755 --- a/IPython/terminal/ipapp.py +++ b/IPython/terminal/ipapp.py @@ -389,7 +389,7 @@ def load_default_config(ipython_dir=None): return config -launch_new_instance = TerminalIPythonApp.launch_new_instance +launch_new_instance = TerminalIPythonApp.launch_instance if __name__ == '__main__':