IPAPI配置文件在哪里? [英] Where do I put IPython configuration files?

查看:171
本文介绍了IPAPI配置文件在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试将我的%编辑器设置为Emacs一段时间,进度非常缓慢。

I have been trying to set my %edit editor to Emacs for a while and made very slow progress.

IPython 0.13文档不清楚如何实际配置这个。它告诉我,通过添加

The IPython 0.13 docs were unclear about how to actually configure this. It told me to set EDITOR to the desired editor (in my case, "emacsclient") by adding

c = get_config()
c.InteractiveShell.editor = 'emacsclient'

到我的ipython文件夹中的配置。

to my config in my ipython folder.

但是,我找不到任何这样的文件夹。我花了很长时间寻找如何设置IPython环境变量,只找到相关的片段。要使用什么代码启动脚本的.py和.ipy文件之间的区别。 etc。

However, I couldn't find any such folder. I spent a very long time looking around to find just how to set IPython environment variables and found only related snippets. What code to use. The difference between .py and .ipy files for startup scripts. Etc.

我使用的是Ubuntu 12.10。我在哪里可以把配置文件放在IPython 0.13?

I am using Ubuntu 12.10. Where do I put my config file for IPython 0.13?

推荐答案

我有 c.TerminalInteractiveShell.editor = emacsclient〜/ .config / ipython / profile_default / ipython_config.py 中,它的工作原理。

I have c.TerminalInteractiveShell.editor = 'emacsclient' in ~/.config/ipython/profile_default/ipython_config.py and it works.

如果您无法找到配置位置,请使用 ipython查找配置文件命令:
http://ipython.org/ipython-doc/rel-0.13/whatsnew/version0 .13.html#new-top-level-locate-command

If you have trouble finding config location, use ipython locate profile command: http://ipython.org/ipython-doc/rel-0.13/whatsnew/version0.13.html#new-top-level-locate-command

但是,我认为设置编辑器最简单的方法是使用 export EDITOR = emacsclient 在您的 shell 设置(例如〜/ .bashrc )。

But I think the easiest way to setup editor is to have something like export EDITOR=emacsclient in your shell setup (e.g. ~/.bashrc).

这篇关于IPAPI配置文件在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆