Browse Source

ob-python: inhibit return of the eoe string during session evaluation

* lisp/ob-python.el (org-babel-python-evaluate-session): Inhibit
  return of the eoe string during session evaluation.
Eric Schulte 13 years ago
parent
commit
e409a859ff
1 changed files with 7 additions and 6 deletions
  1. 7 6
      lisp/ob-python.el

+ 7 - 6
lisp/ob-python.el

@@ -255,12 +255,13 @@ last statement in BODY, as elisp."
 			   (split-string body "[\r\n]"))
 		     (send-wait)))
     ((lambda (results)
-       (if (or (member "code" result-params)
-	       (member "pp" result-params)
-	       (and (member "output" result-params)
-		    (not (member "table" result-params))))
-	   results
-	 (org-babel-python-table-or-string results)))
+       (unless (string= (substring org-babel-python-eoe-indicator 1 -1) results)
+	 (if (or (member "code" result-params)
+		 (member "pp" result-params)
+		 (and (member "output" result-params)
+		      (not (member "table" result-params))))
+	     results
+	   (org-babel-python-table-or-string results))))
      (case result-type
        (output
 	(mapconcat