IPython setting text editor

醉酒当歌 提交于 2019-12-13 00:44:07

问题


Am trying to set ipython default text editor. Using Ipython 0.13.2 Using the %edit magic I get the following message:

No default editor available.
Specify a GUI text editor in the `IPythonWidget.editor` configurable to enable the %edit magic

tried looking for it in IPython tried importing IPythonWidget.. no luck

Have checked the following questions: Ipython Configuration - Config Classes Overview also checked the the Overview of Ipython config system. http://ipython.org/ipython-doc/stable/config/overview.html

I can create profiles (using the ipython command line options) and I know where they are have added started files to the startup folder in the config directory.

I don't follow how the Configuration classes work at all. Looks like I have to create them? Should I save them in my ipython configuration startup folder?

Specifically looking to set Sublime Text as editor, but if I can get instructions on any editor, can probably adapt it form there.


回答1:


In your profile, edit ipython_qtconsole_config.py, you'll find a line # c.IPythonWidget.editor = '' uncomment and set the value to the command to launch your editor.




回答2:


Do

$jupyter qtconsole --generate-config

This will create jupyter_qtconsole_config.py in your default jupyter config directory with the option c.IPythonWidget.editor = '' commented out



来源:https://stackoverflow.com/questions/17339486/ipython-setting-text-editor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!