我一直在使用"ipython --script"为每个ipython笔记本自动保存.py文件,这样我就可以用它将类导入到其他笔记本中.但是这个最近停止工作,我收到以下错误消息:
`--script` is deprecated. You can trigger nbconvert via pre- or post-save hooks:
ContentsManager.pre_save_hook
FileContentsManager.post_save_hook
A post-save hook has been registered that calls:
ipython nbconvert --to script [notebook]
which behaves similarly to `--script`.
Run Code Online (Sandbox Code Playgroud)
据我所知,我需要设置一个后保存挂钩,但我不明白该怎么做.谁能解释一下?