如何自动保存ipython笔记本 [英] How to autosave ipython notebook

查看:84
本文介绍了如何自动保存ipython笔记本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人知道在执行单元之前是否有选项(或建议的破解方法)使IPython笔记本自动保存吗?

Does anyone know if there's an option (or a suggested hack) to make IPython notebooks save automatically before executing a cell?

很多时候,我一直在做某件事而没有节省很多时间,然后我执行了一个愚蠢的命令,该命令在控制台上打印了很多废话,以至于我的浏览器无法响应,导致我失去了所有工作.

Many times I've been working on something without saving for quite some time, then I execute a stupid command that prints so much crap to the console that my browser becomes unresponsive, leading to me losing all my work.

定时自动保存也可以解决问题.

A timed autosave might also do the trick.

推荐答案

开发版本具有完全实现的功能.按照 ipython github 上的说明进行安装.

The development version has that feature fully implemented. Install it by following the instructions on the ipython github.

回购中的说明:

如果您想入侵某些部分,例如IPython笔记本,在 干净的环境(例如virtualenv),您可以使用pip抓取 快速必要的依赖项:

If you want to hack on certain parts, e.g. the IPython notebook, in a clean environment (such as a virtualenv) you can use pip to grab the necessary dependencies quickly:

 $ git clone --recursive https://github.com/ipython/ipython.git
 $ cd ipython
 $ pip install -e ".[notebook]"

这将安装必要的 将IPython打包并符号链接到当前环境中,以便 您可以处理本地存储库副本并在任何地方运行它:

This installs the necessary packages and symlinks IPython into your current environment so that you can work on your local repo copy and run it from anywhere:

 $ ipython notebook

这篇关于如何自动保存ipython笔记本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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