From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Odd interaction with Python sessions and Org 8.2.5 Date: Thu, 06 Mar 2014 15:06:28 -0700 Message-ID: <87y50nt1jz.fsf@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43403) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLgdK-0002WJ-Q6 for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 17:19:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WLgdC-00062q-Kk for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 17:19:18 -0500 Received: from mail-pb0-x232.google.com ([2607:f8b0:400e:c01::232]:35412) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WLgdC-00061e-Dw for emacs-orgmode@gnu.org; Thu, 06 Mar 2014 17:19:10 -0500 Received: by mail-pb0-f50.google.com with SMTP id md12so3251592pbc.9 for ; Thu, 06 Mar 2014 14:19:09 -0800 (PST) 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: "R. Michael Weylandt" Cc: "emacs-orgmode@gnu.org" Hi Michael, I believe this is a limitation of the current Python session support. The relevant code is in lisp/ob-python.el and any fix would probably end up modifying the `org-babel-python-evaluate-session' function. Best, "R. Michael Weylandt" writes: > Hi, > > I'm having trouble getting clean output from org 8.2.5 when I combine > session based evaluation and capturing results from standard out. (See > first example below) > > This is on Emacs 24.3 with the default python mode settings and > nothing relevant in my init.el except for activating python support. > > Is this expected behavior or is there someway I can fix the first example? > > Michael > > <---------8---------------------------8----------------> > > #+TITLE: Hello World > * Standard Out + Session (Problem) > #+BEGIN_SRC python :results output :session *Python* > def test(): > print "Hello World" > > test() > #+END_SRC > > #+RESULTS: > : > : ... >>> Hello World > > * Standard Out + No Session (Fine) > > #+BEGIN_SRC python :results output > def test(): > print "Hello World" > > test() > #+END_SRC > > #+RESULTS: > : Hello World > > * Value + Session > #+BEGIN_SRC python :session *Python* > def test(): > print "Hello World" > > test() > #+END_SRC > > #+RESULTS: > > * Value + No Session > #+BEGIN_SRC python > def test(): > print "Hello World" > > test() > #+END_SRC > > #+RESULTS: > : None > -- Eric Schulte https://cs.unm.edu/~eschulte PGP: 0x614CA05D