From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ken Mankoff Subject: Re: Org + Elpy Python + IPython Date: Tue, 20 May 2014 12:47:48 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52185) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmnCt-0002NU-3T for emacs-orgmode@gnu.org; Tue, 20 May 2014 12:48:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WmnCj-0000KR-U3 for emacs-orgmode@gnu.org; Tue, 20 May 2014 12:48:03 -0400 Received: from mail-qg0-x22c.google.com ([2607:f8b0:400d:c04::22c]:51156) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WmnCj-0000KL-Qb for emacs-orgmode@gnu.org; Tue, 20 May 2014 12:47:53 -0400 Received: by mail-qg0-f44.google.com with SMTP id i50so1189393qgf.3 for ; Tue, 20 May 2014 09:47:53 -0700 (PDT) In-reply-to: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Org-mode mailing list Cc: John Kitchin Addendum to this old thread: On 2014-05-07 at 22:52, Ken Mankoff wrote: > FYI Org + Elpy + IPython all play nicely now. > > There have been some previous posts about people (me included) having > trouble using the full IPython stack in Org Mode. Some of those > problems were limited to when using sessions, and others only if > trying to take full advantage of the nice Python support provided by > Elpy (enabled via the (elpy-use-ipython) command). > > I think the primary issue was Org text analysis on the >>> prompt which > in IPython becomes "In [n]:". This is solved with the "--classic" flag > to ipython. > > With this setup: > > (setq org-babel-python-command "ipython --pylab=qt4 --pdb --nosep --classic --no-banner --no-confirm-exit") > > I now have Org, Python, IPython, and Elpy (including > (elpy-use-ipython)) all running together in session and non-session > mode. ipython --classic appears to let IPython work properly with Org, but it does not. There are some nefarious bugs. For example, the second indented for loop (foo, bar) never runs if the interpreter is "ipython --classic", but runs properly for "python". for n in [1,2]: print n for a in ['a','b']: print a for f in ['foo','bar']: print f It appears that IPython munges empty lines differently than python. I've tried the " --no-autoindent" and "--no-pprint" and the blank line still causes problems. Anyway, I recommend sticking with plain Python which works in all code I've tried both session and non-session. -k.