我试图在emacs上启动I python控制台,方法是在编辑python脚本时键入C-cc-p。但是ipython控制台看起来是空白的。虽然当我键入一些命令时,会有一个输出并显示输出提示。此外,当我在Ext()中显示许多IN()提示符时。为什么是这个案子?
我使用的是emacs版本24.3、I python 2.1.0和python2.7.6。下面是我的init.el

;;; To start emacs maximized at startup
(w32-send-sys-command 61488)


;;; To remove the toolbar from emacs
(tool-bar-mode 0)


;;; IDO configuration
(setq ido-enable-flex-matching t)
(setq ido-everywhere t)
(ido-mode 1)


;;; Add MELPA repository
(require 'package)
(package-initialize)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)


;;; Configure Aspell
(add-to-list 'exec-path "C:/Program Files (x86)/Aspell/bin/")
; Tell emacs to use Aspell and provide the location of custom dictionary
(setq ispell-program-name "aspell")
(setq ispell-personal-dictionary "C:/emacs/.emacs.d/my_dict/my_dict.ispell")
; Turn it on
(require 'ispell)


;;; Flyspell configuration
(add-to-list 'load-path "~/.emacs.d/flyspell")
(autoload 'flyspell-mode "flyspell" "On-the-fly spelling checker." t)
(autoload 'flyspell-delay-command "flyspell" "Delay on command." t)
(autoload 'tex-mode-flyspell-verify "flyspell" "" t)
(add-hook 'LaTeX-mode-hook 'flyspell-mode)  ; Auto-start flyspell with LaTeX


;;; Enable auto-complete mode
(require 'auto-complete)
(add-to-list 'ac-dictionary-directories "~/.emacs.d/ac-dict")
(require 'auto-complete-config)
(ac-config-default)
(global-auto-revert-mode t)


;;; RefTex configuration
(require 'reftex)
(add-hook 'LaTeX-mode-hook 'turn-on-reftex)
(add-hook 'latex-mode-hook 'turn-on-reftex)


;;; Activate code folding in AUCTeX
(add-hook 'LaTeX-mode-hook (lambda ()
             (TeX-fold-mode 1)))


;;; Setup jedi
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)


;;; Pair braces and quotes automatically (autopair)
(require 'autopair)
(autopair-global-mode) ;; Enable autopair in all buffers


;; (setq py-install-directory "~/.emacs.d/python-mode.el-6.1.3")
;; (add-to-list 'load-path py-install-directory)
;; (require 'python-mode)

(require 'python)
(setq python-shell-interpreter "ipython")
(setq python-shell-interpreter-args "--pylab")

最佳答案

我对python.el代码还不够熟悉,不能给您一个好的答案,但是如果您看看python.el的开头(“commentation:”部分),您将看到它谈到了如何使用Ipython。这就是说,它出现了各种各样的问题。即将发布的24.4版本中的python.el代码显著改善了Ipython的支持,因此它不需要所有的配置,而且实际上可以工作(假设)。由于24.4离发布已经很近了,我们正在寻找能够帮助我们摆脱最后几个bug的人,所以如果您可以尝试最新的预测试(24.3.94)来看看这是否解决了您的问题,如果没有,请执行M-x report-emacs-bug以便我们可以在发布之前修复它。

关于python - 在emacs中启动时,ipython中没有提示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/26041622/

10-14 16:02
查看更多