emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] Fwd: run python from org, draft


From: Eric Schulte
Subject: Re: [O] Fwd: run python from org, draft
Date: Fri, 29 Mar 2013 10:47:17 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

> As we've proven a couple of times now, Python session are broken with
> the newest version of Emacs (since the upstream change to an entirely
> new python.el implementation).

I've just pushed up a fix to ob-python.el so that sessions should now
work with the latest version of Emacs.  I hope this clears up some of
the miss-understandings surrounding ob-python.

Here is a quick example usage.

#+Title: Python Sessions

Works with an un-named session.
#+begin_src python :session
  x = 1 + 2
  x
#+end_src

#+RESULTS:
: 3

#+begin_src python :session
  x
#+end_src

#+RESULTS:
: 3

Works with a named session.
#+begin_src python :session foo
  x = 9
  x
#+end_src

#+RESULTS:
: 9

#+begin_src python :session foo
  x
#+end_src

#+RESULTS:
: 9

Notice that the un-named session still has the desired value.
#+begin_src python :session
x
#+end_src

#+RESULTS:
: 3
-- 
Eric Schulte
http://cs.unm.edu/~eschulte

reply via email to

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