emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Odd interaction with Python sessions and Org 8.2.5


From: Eric Schulte
Subject: Re: [O] Odd interaction with Python sessions and Org 8.2.5
Date: Thu, 06 Mar 2014 15:06:28 -0700
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

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" <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]