Works for me, see example below
#+BEGIN_SRC python :results output :session foo
x=100
print "hello": >>> hello
2
print "bye"
#+END_SRC
#+RESULTS:
:
: 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