From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: Fwd: run python from org, draft Date: Fri, 29 Mar 2013 09:09:08 -0600 Message-ID: <87sj3e6y5n.fsf@gmail.com> References: <5154BC51.1050001@easy-emacs.de> <5155A97D.2090907@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULavp-0004qs-WA for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 11:09:31 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULavm-0004ry-El for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 11:09:29 -0400 Received: from mail-pa0-f54.google.com ([209.85.220.54]:60829) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULavm-0004ru-8M for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 11:09:26 -0400 Received: by mail-pa0-f54.google.com with SMTP id fa10so381170pad.41 for ; Fri, 29 Mar 2013 08:09:25 -0700 (PDT) In-Reply-To: (John Hendy's message of "Fri, 29 Mar 2013 09:57:54 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: John Hendy Cc: emacs-orgmode , Gary Oberbrunner >> with current >> >> GNU Emacs 24.3.1 (i686-pc-linux-gnu, GTK+ Version 2.24.14) of 2013-03-05 >> >> Org-mode version 7.9.3f (release_7.9.3f-17-g7524ef @ >> MY_PATH/emacs-24.3/lisp/org/) >> >> python from org-source seems completely broken. >> >> For example: >> >> #+BEGIN_SRC python >> 1+2 >> #+END_SRC >> >> #+RESULTS: >> : None >> >> > Weird. With all the testing we did last week, I'm surprised that this is > the case with me as well. I'm also getting no results with Org 8.0-pre and > Emacs 24.3.1. > Because of quirks of the python language, when executing outside of a session, it is necessary to explicitly specify a return. For example. #+begin_src python return 1+2 #+end_src #+RESULTS: : 3 or #+begin_src python :return x x = 1+2 #+end_src #+RESULTS: : 3 This is clearly stated in the Python documentation on Worg. http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html Thanks, -- Eric Schulte http://cs.unm.edu/~eschulte