How to obtain Jupyter Notebook's path?

前端 未结 4 2147
礼貌的吻别
礼貌的吻别 2021-01-04 21:20

Is there a function to obtain a Notebook\'s path?

I\'ve Googled a little on the subject but didn\'t find a simple way to do it... I want to obtain the Notebook\'s p

4条回答
  •  清酒与你
    2021-01-04 21:41

    use this in cell

    %%javascript
    IPython.notebook.kernel.execute('nb_name = "' + IPython.notebook.notebook_name + '"')
    print(nb_name)
    

提交回复
热议问题