python - 魔术命令 %edit 应该在 iPython 中调用 IDLE

标签 python ipython python-idle

在 iPython 中执行 %edit 时,是否可以打开 IDLE 而不是 Linux 中的默认 vi? 如何?

最佳答案

摘自%edit?

%edit runs IPython's editor hook. The default version of this hook is
set to call the editor specified by your $EDITOR environment variable.
If this isn't found, it will default to vi under Linux/Unix and to
notepad under Windows. See the end of this docstring for how to change
the editor hook.

You can also set the value of this editor via the
``TerminalInteractiveShell.editor`` option in your configuration file.
This is useful if you wish to use a different editor from your typical
default with IPython (and for Windows users who typically don't set
environment variables).

....

所以我想你可以在 $EDITOR 或 .ipython/profile_xxx/[right configfile].py 中设置 IDLE

关于python - 魔术命令 %edit 应该在 iPython 中调用 IDLE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14862184/

相关文章:

python - 如何让 Pylance 理解 Pydantic 的 `allow_population_by_field_name` 初始化器?

python - 如何在 PyYaml 中添加自定义嵌套标签?

python - 更改 Homebrew 程序中的默认 iPython 以使用 Python 2.x.x 而不是 Python 3.x.x

python - 将 Ply 与 iPython/Jupyter 结合使用

Python空闲。自动完成/显示完成不起作用

python - 正则表达式在两个标签之间查找单词

python - 有没有办法使用他们的 API 搜索 edx 类(class)?

ipython - 无法在 ipython 终端中运行魔法函数

python-idle - 如何将空闲状态从 64 位切换到 32 位?

python - Python .py 文件的上下文菜单 "Open with IDLE"被吹走了