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" <michael.weyla...@gmail.com> 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