我正在尝试使用%loadpy
魔法保存我加载到我的 IPython 笔记本中的 python 文件。当我尝试保存文件时,%save settings.py
出现以下错误:
File `settings.py` exists. Use `%save -f 'settings.py' -f` to force overwrite
然后当我使用%save -f 'settings.py' -f
我得到错误:
'-f' was not found in history, as a file, url, nor in the user namespace.
%save -f 'settings.py'
也会产生错误'' was not found in history, as a file, url, nor in the user namespace.
。
知道如何正确保存.py
文件以覆盖以前的版本吗?谢谢!