【问题标题】:ipython under Emacs for WIndows hangs shellEmacs for WIndows下的ipython挂shell
【发布时间】:2012-06-25 15:18:14
【问题描述】:

您好,我最近在 2012 年 4 月下载了 ipython 0.12.1,并让它在 Windows 终端下运行。即我打开命令提示符并键入 ipython,然后出现 ipython 提示符。

在我需要在 emacs 中使用它之前,一切都很好。因此,在尝试使用 pyton-mode.el 或 ipython.el (目前冻结我的 emacs )之前,我尝试使用 M-x shell 或 M-x eshell 并输入 ipython -i。

这是我在 shell 完全挂起之前得到的跟踪:

ipython -i

Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit (Intel)]
Type "copyright", "credits" or "license" for more information.

IPython 0.12.1 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.
WARNING: Readline services not available or not loaded.WARNING: Proper color support under MS Windows requires the pyreadline library.
You can find it at:
http://ipython.org/pyreadline.html
Gary's readline needs the ctypes module, from:
http://starship.python.net/crew/theller/ctypes
(Note that ctypes is already part of Python versions 2.5 and newer).

Defaulting color scheme to 'NoColor'

那么为什么它会挂在 emacs shell 中并在常规命令提示符下工作。我需要更改我的默认 emacs shell 吗?我也在两台不同的机器上试过这个。我错过了什么吗?

【问题讨论】:

    标签: python shell emacs ipython windows-shell


    【解决方案1】:

    显然,在 Windows 下执行此操作的唯一方法是创建一个批处理文件,即使在 0.12 发行版中存在一个可执行文件 (ipython.exe)。我的脚本如下:

    [ipython.bat] @python.exe -i C:\devel\Python\2.7-bin\Scripts\ipython-script.py --pylab %*

    对于 Windows 下 matplotlib 和 numpy 的用户,pylab 选项仍然无法正常工作,因为它会冻结您的图形窗口。为了让它工作,我不得不恢复到 ipython 0.10 并在 ipython.bat 脚本中使用 -wthread 选项而不是 -pylab 。这实际上产生了一个很好的交互式图形环境

    【讨论】:

    • 好吧,我只是想知道您是否找到解决方案? '因为我最近用 ipython 设置了我的 emacs 并且遇到了同样的问题,我的是 emacs 24.3 和 ipython 13.1 /13.2,谢谢!
    • 我在python-mode项目下打开了一个bug,但它仍然未分配。到目前为止,在 Windows 上我只使用 ipython 0.10,它工作正常。仍然没有让它在 ipython 0.13 及更高版本上工作。在 Linux 和 OS X 上运行良好
    猜你喜欢
    • 1970-01-01
    • 2011-08-04
    • 2023-03-30
    • 1970-01-01
    • 1970-01-01
    • 2013-12-20
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多