summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2013-03-29 14:28:29 -0600
committerEric Schulte <schulte.eric@gmail.com>2013-03-29 14:28:29 -0600
commit2a0e45f70199774b25d55ad83e7fd48694feb64c (patch)
treed21ae89d4185083074c27eed6c0e121db3b35bc2
parent310e76b744936d34e9fd1692fadfbe108006ff6d (diff)
downloadorg-mode-2a0e45f70199774b25d55ad83e7fd48694feb64c.tar.gz
Add "-i" to the python command on windows sessions
Thanks to Gary Oberbrunner for showing how to do this, and noticing that it was required, and even for submitting a patch which I unfortunately didn't notice until it had already been overcome by events. * lisp/ob-python.el (org-babel-python-initiate-session-by-key): Add "-i" to the python command on windows sessions
-rw-r--r--lisp/ob-python.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index 59c77e4..6829905 100644
--- a/lisp/ob-python.el
+++ b/lisp/ob-python.el
@@ -189,7 +189,10 @@ then create. Return the initialized session."
(setq python-buffer (org-babel-python-with-earmufs session)))
(let ((python-shell-buffer-name
(org-babel-python-without-earmufs python-buffer)))
- (run-python org-babel-python-command)))
+ (run-python
+ (if (member system-type '(cygwin windows-nt ms-dos))
+ (concat org-babel-python-command " -i")
+ org-babel-python-command))))
(run-python)))
((and (eq 'python-mode org-babel-python-mode)
(fboundp 'py-shell)) ; python-mode.el