From d57887adc70c524199b3307b74f17ea5751450f0 Mon Sep 17 00:00:00 2001 From: Eric Schulte Date: Fri, 25 Apr 2014 09:24:04 -0600 Subject: [PATCH] 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. --- lisp/ob-python.el | 2 ++ 1 file changed, 2 insertions(+) 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) "")) -- 1.9.2