Hi Dan, On Thu, Oct 8, 2009 at 4:11 PM, Dan Davison <davi...@stats.ox.ac.uk> wrote: > Juan Reyero <joa...@gmail.com> writes: >> #+begin_src python :session :results output >> 2 >> #+end_src >> >> #+resname: >> : 2 >> : 2 >> >> (expected nothing, which is what I get if I remove the :session). > > An understandable expectation. In non-session mode, we collect stdout > and if the expression "2" is passed to the interpreter nothing is output > to stdout. However in session mode we collect whatever output appears in > the comint buffer, and if you give the interpreter "2" the interpreter > comes back and prints the value of that expression.
Ah, got it. Thanks a lot. It's kind of tricky to know what you are going to get, however. For example: #+begin_src python :session :results output str('10' + 'm/s') '12' #+end_src #+resname: : 10' + 'm/s') : '10m/s : 12' : '12 I guess the answer to that would be to only use :results value when in :session mode. > ... However I can't replicate this > behaviour under linux. I get > > #+resname: > : 2 > > for all three examples. > > I'm using org-version 6.31trans in emacs-version 23.0.91.1 under ubuntu > jaunty with python 2.6.2. Is this definitely replicable under OSX? Yes, definitely. I am using emacs version 22.3.1, and python 2.6.1. I have stripped bare my .emacs, and still: #+begin_src python :session :results value 2 #+end_src #+resname: : 0 jm -- http://juanreyero.com/blog _______________________________________________ Emacs-orgmode mailing list Remember: use `Reply All' to send replies to the list. Emacs-orgmode@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-orgmode