Example #1
0
def jupyter_app(caplog):
    """Initialized (but unlaunched) Jupyter app."""
    app = JupyterApp.instance()
    app.log.addHandler(caplog.handler)
    yield app
    app.log.removeHandler(caplog.handler)
    app.clear_instance()
Example #2
0
 def _data_dir_default(self):
     app = None
     try:
         if JupyterApp.initialized():
             app = JupyterApp.instance()
     except MultipleInstanceError:
         pass
     if app is None:
         # create an app, without the global instance
         app = JupyterApp()
         app.initialize(argv=[])
     return app.data_dir
Example #3
0
 def _data_dir_default(self):
     app = None
     try:
         if JupyterApp.initialized():
             app = JupyterApp.instance()
     except MultipleInstanceError:
         pass
     if app is None:
         # create an app, without the global instance
         app = JupyterApp()
         app.initialize(argv=[])
     return app.data_dir