emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* run python from org, draft
@ 2013-03-28 21:55 Andreas Röhler
       [not found] ` <CAFChFyjZyxcnH1_jSWEUgXNkvJ0c3F8f4ojQa_EtPov2TjtziQ@mail.gmail.com>
  0 siblings, 1 reply; 27+ messages in thread
From: Andreas Röhler @ 2013-03-28 21:55 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 278 bytes --]

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

[-- Attachment #2: ob-python.el.patch --]
[-- Type: text/x-patch, Size: 755 bytes --]

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))

^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2013-03-31 20:04 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-28 21:55 run python from org, draft Andreas Röhler
     [not found] ` <CAFChFyjZyxcnH1_jSWEUgXNkvJ0c3F8f4ojQa_EtPov2TjtziQ@mail.gmail.com>
2013-03-29 12:11   ` Fwd: " Gary Oberbrunner
2013-03-29 14:47     ` Andreas Röhler
2013-03-29 14:57       ` John Hendy
2013-03-29 15:09         ` Eric Schulte
2013-03-29 15:29           ` Andreas Röhler
2013-03-29 16:20             ` Eric Schulte
2013-03-29 16:49               ` Andreas Röhler
2013-03-29 16:59                 ` Eric Schulte
2013-03-29 18:33                   ` Evan Misshula
2013-03-29 18:50                     ` Eric Schulte
2013-03-29 19:04                       ` Evan Misshula
     [not found]             ` <CAFChFyhRbz6hh-NyOZTfdKJcTPh=F3J=07k2fR9p+A9Wig_pRA@mail.gmail.com>
2013-03-29 20:10               ` Fwd: " Gary Oberbrunner
2013-03-29 20:58                 ` Andreas Röhler
2013-03-31 20:04                   ` Gary Oberbrunner
2013-03-29 15:35           ` John Hendy
     [not found]             ` <CAFChFyhOrPVS2E5CE9H2+zX5TFV4D-themQbjx2DaSx-WmG14g@mail.gmail.com>
2013-03-29 20:11               ` Fwd: " Gary Oberbrunner
2013-03-29 15:50           ` John Hendy
2013-03-29 16:23             ` Eric Schulte
2013-03-29 16:47               ` Eric Schulte
2013-03-29 19:06                 ` Andreas Röhler
2013-03-29 20:04                 ` Andreas Röhler
2013-03-29 19:59           ` Gary Oberbrunner
2013-03-29 20:15             ` Andreas Röhler
2013-03-29 20:25             ` Eric Schulte
2013-03-29 20:45               ` Gary Oberbrunner
2013-03-29 21:13                 ` Eric Schulte

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).