From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#18052: 24.3; python.el and ipython shell Date: Fri, 18 Jul 2014 17:07:21 +0300 Message-ID: <83tx6e69ra.fsf@gnu.org> References: Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1405692506 4996 80.91.229.3 (18 Jul 2014 14:08:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 18 Jul 2014 14:08:26 +0000 (UTC) Cc: 18052@debbugs.gnu.org To: Federico Beffa Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 18 16:08:20 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 1X88pe-0006Kz-5E for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 16:08:18 +0200 Original-Received: from localhost ([::1]:49988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X88pd-0006vU-Ng for geb-bug-gnu-emacs@m.gmane.org; Fri, 18 Jul 2014 10:08:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36365) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X88pU-0006sj-9U for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 10:08:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X88pO-000104-Tb for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 10:08:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:34948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X88pO-0000zh-RP for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 10:08:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X88pN-0006J6-UP for bug-gnu-emacs@gnu.org; Fri, 18 Jul 2014 10:08:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 18 Jul 2014 14:08:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18052 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18052-submit@debbugs.gnu.org id=B18052.140569246624218 (code B ref 18052); Fri, 18 Jul 2014 14:08:01 +0000 Original-Received: (at 18052) by debbugs.gnu.org; 18 Jul 2014 14:07:46 +0000 Original-Received: from localhost ([127.0.0.1]:58447 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X88p4-0006IT-Uv for submit@debbugs.gnu.org; Fri, 18 Jul 2014 10:07:46 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:42254) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X88oy-0006I7-Ft for 18052@debbugs.gnu.org; Fri, 18 Jul 2014 10:07:40 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0N8W00M00UJ9VS00@mtaout25.012.net.il> for 18052@debbugs.gnu.org; Fri, 18 Jul 2014 17:03:05 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0N8W00FAXV1553A0@mtaout25.012.net.il>; Fri, 18 Jul 2014 17:03:05 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il 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:91638 Archived-At: > Date: Fri, 18 Jul 2014 15:51:47 +0200 > From: Federico Beffa > > I'm trying to use the ipython shell from within emacs. To do so I've > followed the instructions at the top of python.el and added the > following code to my .emacs: > > (setq > python-shell-interpreter "C:/Anaconda/python.exe" > python-shell-interpreter-args > "-i C:/Anaconda/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") > > When I execute (M-x) run-python, SOMETIMES the session does not > initialize properly and the new buffer looks like this: > > ----------------------------------------------------------- > Python 2.7.6 |Anaconda 2.0.1 (64-bit)| (default, Nov 11 2013, > 10:49:15) [MSC v.1500 64 bit (AMD64)] > Type "copyright", "credits" or "license" for more information. > > IPython 2.1.0 -- An enhanced Interactive Python. > Anaconda is brought to you by Continuum Analytics. > Please check out: http://continuum.io/thanks and https://binstar.org > ? -> 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]: > ----------------------------------------------------------- > > The difference compared to the situation when everything is well, is > that here I only see "In [1]:", while normally I should see 4 empty > input prompts, with the last one reading "In [4]". When I execute any > command such as "1+1" and press RET, nothing happens. > > This happens starting emacs with the -Q option and executing the ipython > customization in the *scratch* buffer. Did you try to explore the possibility that this is caused by buffering? Pipes on Windows are fully buffered, not line-buffered as on Posix systems. If there's some way to control buffering from the Python side, I suggest to try that, perhaps it will fix the problem.