From mboxrd@z Thu Jan 1 00:00:00 1970 From: William Henney Subject: Re: Problem with python session Date: Wed, 12 Oct 2016 23:10:30 -0500 Message-ID: References: <87twclkgyr.fsf@nicolasgoaziou.fr> <87a8earifk.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=f403045da07a58874f053eb74a05 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54353) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buXLm-0005VA-0w for emacs-orgmode@gnu.org; Thu, 13 Oct 2016 00:10:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1buXLk-0002EE-0T for emacs-orgmode@gnu.org; Thu, 13 Oct 2016 00:10:32 -0400 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]:35963) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1buXLj-0002D9-Jm for emacs-orgmode@gnu.org; Thu, 13 Oct 2016 00:10:31 -0400 Received: by mail-it0-x22f.google.com with SMTP id l13so168440404itl.1 for ; Wed, 12 Oct 2016 21:10:31 -0700 (PDT) In-Reply-To: <87a8earifk.fsf@nicolasgoaziou.fr> 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" To: John Kitchin , emacs-org , Florian Lindner --f403045da07a58874f053eb74a05 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Yep, I agree. This is a wart in the vanilla python REPL, and org-mode can't really do much about it. Except maybe warn people. As John noted, this is less of a problem if you use ipython as your REPL. I think it is enough to just do #+BEGIN_SRC emacs-lisp (setq org-babel-python-command "ipython") #+END_SRC but I haven't tested this extensively since, as I mentioned, I prefer to use Greg Sexton's ob-ipython instead. This integrates with the Jupyter kernel by sending JSON to a web socket, rather than just pasting the source block into a buffer, and that seems to be a more robust approach. Will On Tue, Oct 11, 2016 at 10:53 AM, Nicolas Goaziou wrote: > Hello, > > John Kitchin writes: > > > I am not sure it makes sense to change anything for this. > > Noted. Thank you for the feedback. > > Regards, > > -- > Nicolas Goaziou > > --=20 Dr William Henney, Instituto de Radioastronom=C3=ADa y Astrof=C3=ADsica, Universidad Nacional Aut=C3=B3noma de M=C3=A9xico, Campus Morelia --f403045da07a58874f053eb74a05 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Yep, I agree. This is a wart in the vanilla python REPL, a= nd org-mode can't really do much about it.=C2=A0 Except maybe warn peop= le.=C2=A0

As John noted, this is less of a problem if yo= u use ipython as your REPL.=C2=A0 I think it is enough to just do=C2=A0

#+BEGIN_SRC emacs-lisp
(setq org-babel= -python-command "ipython")
#+END_SRC
but I haven't tested this extensively since, =C2=A0as I me= ntioned, I prefer to use Greg Sexton's ob-ipython instead.=C2=A0 This i= ntegrates with the Jupyter kernel by sending JSON to a web socket, rather t= han just pasting the source block into a buffer, and that seems to be a mor= e robust approach.=C2=A0

Will

=

On Tue, Oct= 11, 2016 at 10:53 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>= ; wrote:
Hello,

John Kitchin <jkitchin@andrew= .cmu.edu> writes:

> I am not sure it makes sense to change anything for this.

Noted. Thank you for the feedback.

Regards,

--
Nicolas Goaziou




--

=C2=A0 Dr William Henney, Instituto de Radioastronom=C3= =ADa y Astrof=C3=ADsica,
=C2=A0 Universidad Nacional Aut=C3=B3noma de M= =C3=A9xico, Campus Morelia
--f403045da07a58874f053eb74a05--