emacs-orgmode
[Top][All Lists]
Advanced

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

[O] python sessions


From: Gary Oberbrunner
Subject: [O] python sessions
Date: Tue, 19 Mar 2013 17:40:06 -0400

I must be failing to understand something.  I'm running Emacs 24.3 on Windows, with latest trunk org-mode.  I can't get python functions to persist across blocks in session mode.  Here's my foo.org:

===============

* My Document
#+BEGIN_SRC python :exports results :results output :session
def foo(x):
  return x+1
print "hi"
#+END_SRC

#+RESULTS:
: hi

#+BEGIN_SRC python :exports results :results output :session
print foo(100)
print "bye"
#+END_SRC

========================

In session mode, shouldn't foo be defined in the second python block?  When I export this, I get "NameError: name 'foo' is not defined"

I may be doing something wrong, because if I name my python session, I never see a buffer of that name, and I expected to.  Any help?

--
Gary

reply via email to

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