Browse Source

allow specification of python command w/header arg

  Using the :python header arg.

* lisp/ob-python.el (org-babel-execute:python): Locally set
  `org-babel-python-command' using a header argument.
Eric Schulte 11 years ago
parent
commit
323e05ad28
1 changed files with 2 additions and 0 deletions
  1. 2 0
      lisp/ob-python.el

+ 2 - 0
lisp/ob-python.el

@@ -82,6 +82,8 @@ This function is called by `org-babel-execute-src-block'."
 	 (return-val (when (and (eq result-type 'value) (not session))
 		       (cdr (assoc :return params))))
 	 (preamble (cdr (assoc :preamble params)))
+	 (org-babel-python-command
+	  (or (cdr (assoc :python params)) org-babel-python-command))
          (full-body
 	  (org-babel-expand-body:generic
 	   (concat body (if return-val (format "\nreturn %s" return-val) ""))