William Henney <[email protected]> writes:
Hello, Will!
> Is there an easy way to specify the python version to use for a particular
> block or sub-tree?
Is it something you can define an inherited property or a tag for, and
then add some advice around org-babel-execute:python to check that
property and use let to bind org-babel-python-comand?
Maybe something like this, for example:
#+begin_src emacs-lisp
(defadvice org-babel-execute:python (around will activate)
(if (member "python2" (org-get-tags-at))
(let ((org-babel-python-command "/path/to/python2"))
ad-do-it)
ad-do-it))
#+end_src
* Test :python2:
#+begin_src python
return 1 + 3
#+end_src
Sacha