Retrieving files from remote IPython notebook serv

2019-03-11 04:13发布

If I don't want to give out SSH access to users of my remote IPython notebook server. Is there a way to let users browse non .ipynb files and download them?

1条回答
男人必须洒脱
2楼-- · 2019-03-11 05:12

You can use FileLink and FileLinks that are built-in:

from IPython.display import FileLink, FileLinks
FileLinks('.') #lists all downloadable files on server

The code above generates:

./
some_python_file.py
some_xml_file.xml
some_ipynb_file.ipynb

The three items above are links that you can click to download.

Click here for an example from ipython.org

查看更多
登录 后发表回答