【发布时间】:2013-09-15 02:19:09
【问题描述】:
我正在尝试在 Emacs 中运行 IPython,在 Ubuntu 13.04 上使用 emacs 24.3.1、Python 2.7.4、IPython 0.13.2
当我在 Emacs 中启动 IPython shell 时,它默认为 $HOME 目录。我尝试通过'cd', 'import os, os.chdir()' 切换到我当前的工作目录,但是运行sn-p 代码后,工作目录总是回到$HOME。
有没有办法改变工作目录,或者启动与编辑过的python文件目录相同的Ipython shell?谢谢。
我发现了一个类似的问题Setting the working directory of IPython Shell to that of the python file being executed in Canopy,但不确定如何在 Emacs 中实现...
【问题讨论】: