Преглед изворни кода

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
Eric Schulte пре 12 година
родитељ
комит
2a0e45f701
1 измењених фајлова са 4 додато и 1 уклоњено
  1. 4 1
      lisp/ob-python.el

+ 4 - 1
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