* Odd interaction with Python sessions and Org 8.2.5
@ 2014-03-06 3:02 R. Michael Weylandt
2014-03-06 22:06 ` Eric Schulte
0 siblings, 1 reply; 2+ messages in thread
From: R. Michael Weylandt @ 2014-03-06 3:02 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Odd interaction with Python sessions and Org 8.2.5
2014-03-06 3:02 Odd interaction with Python sessions and Org 8.2.5 R. Michael Weylandt
@ 2014-03-06 22:06 ` Eric Schulte
0 siblings, 0 replies; 2+ messages in thread
From: Eric Schulte @ 2014-03-06 22:06 UTC (permalink / raw)
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" <michael.weylandt@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-06 22:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-06 3:02 Odd interaction with Python sessions and Org 8.2.5 R. Michael Weylandt
2014-03-06 22:06 ` Eric Schulte
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).