예제 #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()
예제 #2
0
파일: sign.py 프로젝트: blink1073/nbformat
 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
예제 #3
0
파일: sign.py 프로젝트: takluyver/nbformat
 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