From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Andreas_R=F6hler?= Subject: run python from org, draft Date: Thu, 28 Mar 2013 22:55:29 +0100 Message-ID: <5154BC51.1050001@easy-emacs.de> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050408040405090402020601" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:57501) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULKm2-0003it-8g for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:54:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ULKm0-0003UI-FD for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:54:18 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:59464) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ULKm0-0003Tz-6G for emacs-orgmode@gnu.org; Thu, 28 Mar 2013 17:54:16 -0400 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: emacs-orgmode This is a multi-part message in MIME format. --------------050408040405090402020601 Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Hi, as running python from org-source has been reported broken, herewith a patch, which allows basic usage. Requires python-mode.el-6.1 https://launchpad.net/python-mode/trunk/6.1.1/+download/python-mode.el-6.1.1.tar.gz Just a draft, not thought as implementation, Andreas --------------050408040405090402020601 Content-Type: text/x-patch; name="ob-python.el.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="ob-python.el.patch" diff --git a/lisp/ob-python.el b/lisp/ob-python.el index 7bc9a1f..2734bff 100644 --- a/lisp/ob-python.el +++ b/lisp/ob-python.el @@ -86,8 +86,11 @@ This function is called by `org-babel-execute-src-block'." (org-babel-expand-body:generic (concat body (if return-val (format "\nreturn %s" return-val) "")) params (org-babel-variable-assignments:python params))) - (result (org-babel-python-evaluate - session full-body result-type result-params preamble))) + (result + (py-send-string-return-output full-body) + ;; (org-babel-python-evaluate + ;; session full-body result-type result-params preamble) + )) (org-babel-reassemble-table result (org-babel-pick-name (cdr (assoc :colname-names params)) --------------050408040405090402020601--