[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] [babel] python sessions
From: |
Eric Schulte |
Subject: |
Re: [O] [babel] python sessions |
Date: |
Mon, 04 Jul 2011 11:23:16 -0600 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Andrea Crotti <address@hidden> writes:
> Eric Schulte <address@hidden> writes:
>
>>
>> From what I hear the situation should improve in Emacs24, as there is a
>> ground up re-write which should contain much of the functionality of
>> python-mode.el with the Emacs-amenable license of python.el.
>>
>
> Nice to know, I use python-mode.el and emacs24, but I would vote for a
> merge :)
>
>>
>> The eoe string will only even appear in session output when there is no
>> other result returned by the code block. I've just pushed up a small
>> change which should fix this situation.
>>
>> The eoe will never appear in tangled code as it is part of the
>> interactive session evaluation.
>>
>> Best -- Eric
>
> I think the last patch created some problems, now it often (but not
> always and I can't get why) when I execute the source block, and still I
> can't make it work the previous example that I posted...
>
I don't understand. What do python code blocks often do after
application of the new patch?
Using this attached minimal emacs configuration [1] I was able to
evaluate the code blocks in this simple org-mode file [2] starting Emacs
with the following.
: emacs -Q -l minimal.el short.org
Perhaps your problems are related to use of python-mode.el?
Best -- Eric
Footnotes:
[1] minimal.el
minimal.el
Description: application/emacs-lisp
[2] short.org
#+begin_src python :session :results output
def var(x):
return float(x ** 2)
#+end_src
#+results:
#+begin_src python :session :result value
def var2(x):
return x ** 2 * var(x)
var2(10)
#+end_src
#+results:
: 10000.0
--
Eric Schulte
http://cs.unm.edu/~eschulte/