ob-python: Send RET after every line w/session evaluation

* lisp/ob-python.el (org-babel-python-evaluate-session): Send
  comint-send-input after every line when interacting with an
  interactive python process.
This commit is contained in:
Eric Schulte 2011-06-20 12:18:09 -07:00
parent a0bc3bdebc
commit 56de599c00
1 changed files with 5 additions and 3 deletions

View File

@ -267,9 +267,11 @@ last statement in BODY, as elisp."
(org-babel-comint-with-output
(session org-babel-python-eoe-indicator t body)
(let ((comint-process-echoes nil))
(input-body body)
(insert org-babel-python-eoe-indicator)
(comint-send-input))) 2) "\n"))
(mapc
(lambda (line)
(insert line) (comint-send-input nil t))
(append (split-string body "[\n\r]") (list org-babel-python-eoe-indicator)))))
2) "\n"))
(value
(let ((tmp-file (org-babel-temp-file "python-")))
(org-babel-comint-with-output