---
lisp/ob-python.el
| 8 ++++----
1
file changed, 4 insertions(+), 4 deletions(-)
diff
--git a/lisp/ob-python.el b/lisp/ob-python.el
index
932aca08e..2ad907bd8 100644
---
a/lisp/ob-python.el
+++
b/lisp/ob-python.el
@@
-197,8 +197,7 @@ (defun org-babel-python-initiate-session-by-key (&optional session)
(setq
py-buffer (org-babel-python-with-earmuffs session)))
(let
((python-shell-buffer-name
(org-babel-python-without-earmuffs
py-buffer)))
-
(run-python
cmd)
-
(sleep-for
0 10)))
+
(run-python
cmd)))
((and
(eq 'python-mode org-babel-python-mode)
(fboundp
'py-shell)) ; python-mode.el
(require
'python-mode)
@@
-225,8 +224,9 @@ (defun org-babel-python-initiate-session-by-key (&optional session)
(defun
org-babel-python-initiate-session (&optional session _params)
"Create
a session named SESSION according to PARAMS."
(unless
(string= session "none")
-
(org-babel-python-session-buffer
-
(org-babel-python-initiate-session-by-key session))))
+
(let ((session (org-babel-python-session-buffer
+
(org-babel-python-initiate-session-by-key session)))))
+
(org-babel-comint-wait-for-output session)))
(defvar
org-babel-python-eoe-indicator "org_babel_python_eoe"
"A
string to indicate that evaluation has completed.")
--
2.35.1