The two setting doesn't seem to have effect. (setq python-shell-interpreter "ipython") (setq python-shell-interpreter-args "--pylab") When I did `C-c C-c` on the SRC block to execute the code, emacs created a buffer with the interior python process. When I switched to the process, I saw it is python 2.5.3, not ipython. Also, it looks like the problem is with the shell interpreter. If I enter command directly in the shell buffer, the shell buffer will echo command itself and then the result. >>> print "Hello" print "Hello" Hello. Is there any setting to control this shell behavior? Can I make the python shell not echo the command? Thanks. On Wed, Jun 11, 2014 at 12:48 AM, Doyley, Marvin wrote: > 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 > > >