summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Schulte <schulte.eric@gmail.com>2014-04-25 09:24:04 -0600
committerEric Schulte <schulte.eric@gmail.com>2014-04-25 12:04:04 -0600
commit323e05ad284fc4b4f9f9f8614d0f1f174498550d (patch)
treeaeca4a433861c04cde20f5251add78f7f39b6393
parentc6d698a5ecfbb3810b08f483c447338d6eef6649 (diff)
downloadorg-mode-323e05ad284fc4b4f9f9f8614d0f1f174498550d.tar.gz
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.
-rw-r--r--lisp/ob-python.el2
1 files changed, 2 insertions, 0 deletions
diff --git a/lisp/ob-python.el b/lisp/ob-python.el
index baa5764..eb25609 100644
--- a/lisp/ob-python.el
+++ b/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) ""))