From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Federico Beffa Newsgroups: gmane.emacs.bugs Subject: bug#17542: python.el and ipython Date: Wed, 21 May 2014 15:22:41 +0200 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=20cf301cc6aa1741a404f9e8e456 X-Trace: ger.gmane.org 1400684364 10982 80.91.229.3 (21 May 2014 14:59:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 21 May 2014 14:59:24 +0000 (UTC) To: 17542@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed May 21 16:59:18 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Wn7z8-00023q-GY for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 May 2014 16:59:14 +0200 Original-Received: from localhost ([::1]:60275 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn7z8-0004E9-4M for geb-bug-gnu-emacs@m.gmane.org; Wed, 21 May 2014 10:59:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn7z2-0004E4-Tm for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 10:59:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn7yy-0003DW-4y for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 10:59:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56564) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn7yy-0003DR-1f for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 10:59:04 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Wn7yx-00054X-3F for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 10:59:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Federico Beffa Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 21 May 2014 14:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 17542 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.140068432119452 (code B ref -1); Wed, 21 May 2014 14:59:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 May 2014 14:58:41 +0000 Original-Received: from localhost ([127.0.0.1]:55441 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn7yZ-00053a-9W for submit@debbugs.gnu.org; Wed, 21 May 2014 10:58:40 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58519) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Wn6Tw-0001zZ-HC for submit@debbugs.gnu.org; Wed, 21 May 2014 09:22:57 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn6Tm-0005iY-EU for submit@debbugs.gnu.org; Wed, 21 May 2014 09:22:51 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:52363) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn6Tm-0005iU-Am for submit@debbugs.gnu.org; Wed, 21 May 2014 09:22:46 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn6Tk-0001Nr-DQ for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 09:22:46 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Wn6Ti-0005hC-KU for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 09:22:44 -0400 Original-Received: from mail-ig0-x235.google.com ([2607:f8b0:4001:c05::235]:38962) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Wn6Ti-0005h6-C4 for bug-gnu-emacs@gnu.org; Wed, 21 May 2014 09:22:42 -0400 Original-Received: by mail-ig0-f181.google.com with SMTP id h3so2067019igd.14 for ; Wed, 21 May 2014 06:22:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=tFl2BGDIlGrz1DVXeEonUNUYcAWWZ4jnxCLhLcmUdiI=; b=YZ1GQvMWaGRIP0E5+b1N0KUMzSMzcua8/HI0IGK6XQA9k3dpszeRsbVnwbH9l6vNd3 1AyiARKiHKpeBhzpIx6Q3R0tl37RTFSLcjkd9X22eireEv9gDIF8f7AOWpiKAgpN2THp qLUFTPCQ2bzHadNYNzII9KJutMBpv7aXlKkpFtrZ3ufRGvqvgHQ00tBspjDdEfy7tNTb 6Md2ZW28dT96+1RLlB0HCCmBYXSkc/Dw+LZWe6b6T/E+ns62yabw9XsLjYN4XF9JqMGF Gu1p6qmLLLJORB4trBErjuF8FERZTlypnm+JmBpShRcF1WciPIeNj+7dILjCEfPvDPuq RkYw== X-Received: by 10.42.62.133 with SMTP id y5mr48091056ich.6.1400678561298; Wed, 21 May 2014 06:22:41 -0700 (PDT) Original-Received: by 10.42.216.19 with HTTP; Wed, 21 May 2014 06:22:41 -0700 (PDT) X-Google-Sender-Auth: EJmCnYqEM-6mYLekwEqoopL5tk4 X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Mailman-Approved-At: Wed, 21 May 2014 10:58:37 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:89317 Archived-At: --20cf301cc6aa1741a404f9e8e456 Content-Type: text/plain; charset=UTF-8 I'm trying to set up the python-mode (python.el) to use ipython as the interactive shell. I've added the folloging lines in my .emacs file: (require 'python) (setq python-shell-interpreter "C:/Python27/python.exe" python-shell-interpreter-args "-i C:/Python27/Scripts/ipython-script.py console --matplotlib=tk" ;; python-shell-interpreter-args ;; "-i C:/Python27/Scripts/ipython-script.py console --matplotlib=qt" python-shell-prompt-regexp "In \\[[0-9]+\\]: " python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: " python-shell-completion-setup-code "from IPython.core.completerlib import module_completion" python-shell-completion-module-string-code "';'.join(module_completion('''%s'''))\n" python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n") My python installation is Python(x,y) 2.7.6 (the most recent distribution). I'm having INTERMITTENT problems starting a python shell process (either with run-python or with C-c C-z in a python program source file) while specifying to use the qt backend for matplotlib. Sometimes everything just runs smoothly, but often the new python shell window appears as follows: Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit (Intel)] Type "copyright", "credits" or "license" for more information. IPython 1.2.0 -- 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. In [1]: In [2]: and freezes: no response to whatever command. I just have to kill the buffer. Note that when the process starts correctly I get 4 input prompts (In [1]:\n In [2]:\n In [3]:\n In [4]:\n). The problem happens starting emacs with -Q as well. This does not happen if I use tk as the backend for matplotlib and everything works fine. Everything works fine outside of emacs as well (in a console) with both matplotlib backends. I've checked and confirmed the problem on two different machines running Windows 7 (one with the Ultimate and the other with the Enterprise variant). If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. For information about debugging Emacs, please read the file c:/Program Files (x86)/emacs-24.3/etc/DEBUG. In GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --with-gcc (4.7) --cflags -ID:/devel/emacs/libs/libXpm-3.5.8/include -ID:/devel/emacs/libs/libXpm-3.5.8/src -ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include -ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include -ID:/devel/emacs/libs/giflib-4.1.4-1/include -ID:/devel/emacs/libs/jpeg-6b-4/include -ID:/devel/emacs/libs/tiff-3.8.2-1/include -ID:/devel/emacs/libs/gnutls-3.0.9/include -ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include -ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2' Important settings: value of $LANG: ENU locale-coding-system: cp1252 default enable-multibyte-characters: t Major mode: Python Minor modes in effect: jedi-mode: t auto-complete-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-c C-z y C-x o C-x C-f c : / p r o SPC f SPC e m 3 s i s i d f C-SPC M-x c o m m e r e C-SPC M-x u n c o m C-x C-s C-x k M-x r e p o r Recent messages: Sent python-shell-completion-setup-code Sent python-ffap-setup-code Sent python-eldoc-setup-code Mark set [2 times] Making completion list... Mark set Saving file c:/Program Files (x86)/emacs-24.3/site-lisp/site-start.d/fbe.el... Cannot write backup file; backing up in ~\.emacs.d\%backup%~ Wrote c:/Program Files (x86)/emacs-24.3/site-lisp/site-start.d/fbe.el Making completion list... [3 times] Load-path shadows: None found. Features: (shadow sort flyspell ispell mail-extr emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils help-mode compile network-stream auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util mm-util mail-prsvr password-cache starttls tls warnings advice advice-preload jedi help-fns easy-mmode python-environment auto-complete cl-macs gv popup epc ctable edmacro kmacro concurrent deferred cl cl-lib server preview-latex python rx easymenu comint ring ansi-color jedi-autoloads auto-complete-autoloads epc-autoloads ctable-autoloads concurrent-autoloads popup-autoloads finder-inf python-environment-autoloads deferred-autoloads package tex-site auto-loads time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process w32 multi-tty emacs) --20cf301cc6aa1741a404f9e8e456 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I'm trying to set up the python-mode (python.el) to us= e ipython as the
interactive shell. I've added the folloging lines i= n my .emacs file:

(require 'python)
(setq
=C2=A0python-she= ll-interpreter "C:/Python27/python.exe"
=C2=A0python-shell-interpreter-args
=C2=A0=C2=A0 "-i C:/Python27/Sc= ripts/ipython-script.py console --matplotlib=3Dtk"
=C2=A0;; python-= shell-interpreter-args
=C2=A0;;=C2=A0=C2=A0 "-i C:/Python27/Scripts= /ipython-script.py console --matplotlib=3Dqt"
=C2=A0python-shell-prompt-regexp "In \\[[0-9]+\\]: "
=C2=A0pyt= hon-shell-prompt-output-regexp "Out\\[[0-9]+\\]: "
=C2=A0pytho= n-shell-completion-setup-code
=C2=A0=C2=A0 "from IPython.core.compl= eterlib import module_completion"
=C2=A0python-shell-completion-module-string-code
=C2=A0=C2=A0 "'= ;;'.join(module_completion('''%s'''))\n"=C2=A0python-shell-completion-string-code
=C2=A0=C2=A0 "';= 9;.join(get_ipython().Completer.all_completions('''%s''= '))\n")

My python installation is Python(x,y) 2.7.6 (the most recent
distrib= ution).

I'm having INTERMITTENT problems starting a python shell= process (either
with run-python or with C-c C-z in a python program sou= rce file) while
specifying to use the qt backend for matplotlib. Sometimes everything
ju= st runs smoothly, but often the new python shell window appears as
follo= ws:

Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit= (Intel)]
Type "copyright", "credits" or "license" for = more information.

IPython 1.2.0 -- An enhanced Interactive Python.?=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 -> Introduction and = overview of IPython's features.
%quickref -> Quick reference.
help=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ->= ; Python's own help system.
object?=C2=A0=C2=A0 -> Details about = 'object', use 'object??' for extra details.

In [1]: =
In [2]:

and freezes: no response to whatever command. I just ha= ve to kill the
buffer. Note that when the process starts correctly I get 4 input
prompt= s (In [1]:\n In [2]:\n In [3]:\n In [4]:\n).

The problem happens sta= rting emacs with -Q as well.

This does not happen if I use tk as the= backend for matplotlib and
everything works fine. Everything works fine outside of emacs as well
(i= n a console) with both matplotlib backends.

I've checked and con= firmed the problem on two different machines running
Windows 7 (one with= the Ultimate and the other with the Enterprise variant).

If Emacs crashed, and you have the Emacs process in the gdb debugger,please include the output from the following gdb commands:
=C2=A0=C2= =A0=C2=A0 `bt full' and `xbacktrace'.
For information about debu= gging Emacs, please read the file
c:/Program Files (x86)/emacs-24.3/etc/DEBUG.


In GNU Emacs 24.3.1= (i386-mingw-nt6.1.7601)
=C2=A0of 2013-03-17 on MARVIN
Windowing syst= em distributor `Microsoft Corp.', version 6.1.7601
Configured using:=
=C2=A0`configure --with-gcc (4.7) --cflags
=C2=A0-ID:/devel/emacs/libs/l= ibXpm-3.5.8/include
=C2=A0-ID:/devel/emacs/libs/libXpm-3.5.8/src
=C2= =A0-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
=C2=A0-ID:/devel/ema= cs/libs/zlib-dev_1.2.5-2/include
=C2=A0-ID:/devel/emacs/libs/giflib-4.1.4-1/include
=C2=A0-ID:/devel/emac= s/libs/jpeg-6b-4/include
=C2=A0-ID:/devel/emacs/libs/tiff-3.8.2-1/includ= e
=C2=A0-ID:/devel/emacs/libs/gnutls-3.0.9/include
=C2=A0-ID:/devel/e= macs/libs/libiconv-1.13.1-1-dev/include
=C2=A0-ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'

Impor= tant settings:
=C2=A0 value of $LANG: ENU
=C2=A0 locale-coding-system= : cp1252
=C2=A0 default enable-multibyte-characters: t

Major mode= : Python

Minor modes in effect:
=C2=A0 jedi-mode: t
=C2=A0 auto-complete-mode:= t
=C2=A0 tooltip-mode: t
=C2=A0 mouse-wheel-mode: t
=C2=A0 menu-b= ar-mode: t
=C2=A0 file-name-shadow-mode: t
=C2=A0 global-font-lock-mo= de: t
=C2=A0 font-lock-mode: t
=C2=A0 blink-cursor-mode: t
=C2=A0 auto-composition-mode: t
=C2=A0 au= to-encryption-mode: t
=C2=A0 auto-compression-mode: t
=C2=A0 column-n= umber-mode: t
=C2=A0 line-number-mode: t
=C2=A0 transient-mark-mode: = t

Recent input:
C-c C-z <return> y C-x o C-x C-f <backsp= ace> <backspace>
<backspace> <backspace> <backspace> <backspace> <= ;backspace>
<backspace> c : / p r o <tab> SPC f <tab&= gt; SPC <tab>
e m <tab> 3 <tab> s i <tab> s i &= lt;tab> d <tab> f <tab>
<return> <C-end> <up> <up> <up> <up> &l= t;up> <up> <up>
<up> <up> <up> <up&= gt; <up> <up> <up> <up> C-SPC <down>
<down> M-x c o m m <tab> e <tab> r e <tab> <retu= rn>
<up> <up> <up> <up> C-SPC <down> &= lt;down> M-x u n c o
m <tab> <return> C-x C-s C-x k <= return> M-x r e <tab>
p <tab> o <tab> r <tab> <return>

Recent mess= ages:
Sent python-shell-completion-setup-code
Sent python-ffap-setup-= code
Sent python-eldoc-setup-code
Mark set [2 times]
Making comple= tion list...
Mark set
Saving file c:/Program Files (x86)/emacs-24.3/site-lisp/site-st= art.d/fbe.el...
Cannot write backup file; backing up in ~\.emacs.d\%back= up%~
Wrote c:/Program Files (x86)/emacs-24.3/site-lisp/site-start.d/fbe.= el
Making completion list... [3 times]

Load-path shadows:
None found= .

Features:
(shadow sort flyspell ispell mail-extr emacsbug messa= ge format-spec
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-par= se rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mail= -utils help-mode compile network-stream auth-source eieio byte-opt
bytec= omp byte-compile cconv gnus-util mm-util mail-prsvr password-cache
start= tls tls warnings advice advice-preload jedi help-fns easy-mmode
python-environment auto-complete cl-macs gv popup epc ctable edmacro
kma= cro concurrent deferred cl cl-lib server preview-latex python rx
easymen= u comint ring ansi-color jedi-autoloads auto-complete-autoloads
epc-auto= loads ctable-autoloads concurrent-autoloads popup-autoloads
finder-inf python-environment-autoloads deferred-autoloads package
tex-s= ite auto-loads time-date tooltip ediff-hook vc-hooks
lisp-float-type mwh= eel dos-w32 ls-lisp w32-common-fns disp-table w32-win
w32-vars tool-bar = dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode register page menu-bar rfn-eshadow timer select
scr= oll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham
ge= orgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao
korean = japanese hebrew greek romanian slovak czech european ethiopic
indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple
ab= brev minibuffer loaddefs button faces cus-face macroexp files
text-prope= rties overlay sha1 md5 base64 format env code-pages mule
custom widget h= ashtable-print-readable backquote make-network-process
w32 multi-tty emacs)

--20cf301cc6aa1741a404f9e8e456--