gpt4 book ai didi

ipython - IPython 笔记本的外部编辑器

转载 作者:行者123 更新时间:2023-12-03 20:18:29 28 4
gpt4 key购买 nike

我正在使用 IPython 笔记本,我想在外部编辑器中编辑程序。
我如何获得 %edit file_name.py打开 Notepad++ 等编辑器。

最佳答案

运行 %edit?将为您提供%edit的帮助魔法功能。

您需要设置c.TerminalInteractiveShell.editor ,它在你的 ipython_config.py 中。我不太确定它在 Windows 中的位置;在 OS X 和 Linux 上,它位于 ~/.ipython 中。您需要将变量设置为所需编辑器的完整路径。

或者,您可以在 Windows 本身中创建一个环境变量 EDITOR,并将其设置为您想要的编辑器的完整路径。 iPython 应该使用它。

关于ipython - IPython 笔记本的外部编辑器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15681153/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com