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.
This commit is contained in:
Eric Schulte 2014-04-25 09:24:04 -06:00
parent c6d698a5ec
commit 323e05ad28
1 changed files with 2 additions and 0 deletions

View File

@ -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) ""))