From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Subject: Re: Fwd: run python from org, draft Date: Fri, 29 Mar 2013 16:29:10 +0100 Message-ID: <5155B346.3060708@easy-emacs.de> References: <5154BC51.1050001@easy-emacs.de> <5155A97D.2090907@easy-emacs.de> <87sj3e6y5n.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35776) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULbDi-0002m5-AU for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 11:28:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULbDg-0002ZT-Qs for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 11:27:58 -0400 Received: from moutng.kundenserver.de ([212.227.17.8]:51862) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULbDg-0002ZC-Gy for emacs-orgmode@gnu.org; Fri, 29 Mar 2013 11:27:56 -0400 In-Reply-To: <87sj3e6y5n.fsf@gmail.com> 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: Eric Schulte Cc: emacs-orgmode , Gary Oberbrunner Am 29.03.2013 16:09, schrieb Eric Schulte: >>> 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, or rather the quirks of org-babel? ;) 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, > IMO org-babel should be able to run source code as is. If an org-mode specific modification is required at such a trivial form, what to expect wrt complex environments? BTW this fails also: #+begin_src python print "Hello, world!" #+end_src python #+RESULTS: : None Can't see a consistent behavior so far. Why not follow the path given, which avoids the artistics? Andreas