如何使nbviewer显示本地文件? [英] How to make nbviewer display local files?

查看:307
本文介绍了如何使nbviewer显示本地文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了nbviewer并可以正常工作.我看到它有一个采用文件夹名称的--localfiles选项.它说:在/home/gb/S14/inclass中服务本地笔记本电脑,这可能会带来安全隐患"

I've got nbviewer installed and working. I see it has a --localfiles option that takes a folder name. It says: "Serving local notebooks in /home/gb/S14/inclass, this can be a security risk"

但是我无法弄清楚URL格式是否可以在其中查找文件.该代码为/localfile/(.*)添加了一个处理程序,但是似乎没有被触发.

But I can't figure out the URL format to get it to look for the file there. The code adds a handler for /localfile/(.*) but that doesn't seem to get triggered.

任何人都知道如何格式化名称以触发加载本地文件吗?

Anyone know how to format name to give to trigger loading a local file?

推荐答案

一分钟后,我发现即使服务器支持,首页也可能不支持.果然,http://localhost:5000/localfile/PythonReference.ipynb?create=1渲染本地笔记本.

One minute later and it occurs to me that the front page might not support even though the server does. Sure enough, http://localhost:5000/localfile/PythonReference.ipynb?create=1 renders the local notebook.

这篇关于如何使nbviewer显示本地文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆