コード例 #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