在只读视图中打开ipython notebooks(* .ipynb)(如html文件) [英] open ipython notebooks (*.ipynb) in read-only view (like a html file)

查看:555
本文介绍了在只读视图中打开ipython notebooks(* .ipynb)(如html文件)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在随着越来越多的ipython笔记本文件(* .ipynb)的出现,每次我想偷看一些笔记本时都会非常令人不安,我必须为它打开一个服务器,并且不能以只读模式进行(由于自动保存,如果不是只读模式,我可能会在读取文件时意外更改文件。)

Nowadays with more and more ipython notebook files (*.ipynb) around, it is very disturbing every time when I want to peek at some notebook I have to open a server for it, and cannot do it in read-only mode (due to auto-save I can accidentally change the file when reading it if not in read-only mode).

我希望这样的事情: ipython notebook mynb.ipynb --read-only 可以工作,但遗憾的是它没有(虽然它仍然创建了一个我不想在只读视图中使用的服务器)。我真正想要的是打开像html文件的ipynb文件进行阅读,目前看来缺少ipynb文件的视图,现在笔记本更像是一个黑盒子或近二进制文件。

I hope something like this: ipython notebook mynb.ipynb --read-only would work, but sadly it doesn't (although still it creates a server which I don't really want in read-only view). What I really want is to open ipynb file like html file for reading, currently it seems a missing view of ipynb file, and now the notebook is more like a black-box or near-binary file alone.

(PS,我正在使用Linux / Ubuntu。)

(PS, I am using Linux/Ubuntu.)

推荐答案

当你更改笔记本文件时'权限,jupyter的自动保存不会触及它们:

When you change the notebook files' permissions, jupyter's auto-save doesn't touch them:

chmod aw * .ipynb

然后jupyter进入只读模式:

Then jupyter goes into read-only mode:

这篇关于在只读视图中打开ipython notebooks(* .ipynb)(如html文件)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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