emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] babel python example not reproducible


From: Doyley, Marvin
Subject: Re: [O] babel python example not reproducible
Date: Wed, 11 Jun 2014 03:48:36 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin)

Works for me, see example below
#+BEGIN_SRC python :results output :session foo

x=100
print "hello"
2
print "bye"
#+END_SRC

#+RESULTS:
: 
: >>> hello
: 2
: bye

#+BEGIN_SRC python :results output :session foo

print "hello good bye"
print "Printing value from previous session", x
#+END_SRC

#+RESULTS:
: 
: hello good bye
: Printing value from previous session 100

The only difference is that I like to give my session a name and for
what it is worth I am using ipython (don't think this will make a difference). 
You can do this including the
following statement in your .emacs file

(setq python-shell-interpreter "ipython")
(setq python-shell-interpreter-args "--pylab")

Hope this help.
Cheers,
M




reply via email to

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