Retrieving files from remote IPython notebook server?

ぃ、小莉子 提交于 2019-12-03 05:00:35

问题


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:


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



来源:https://stackoverflow.com/questions/24437661/retrieving-files-from-remote-ipython-notebook-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!