Hi,
I think it should be possible to execute a python block in a session
using python-mode.el but get this message:
"Symbol's function definition is void: py-toggle-shells"
Using the latest git head and opening this file with:
$ emacs -Q thisfile.org
then executing these src blocks in order, shows the problem:
#+BEGIN_SRC emacs-lisp
(require 'org)
(org-babel-do-load-languages
'org-babel-load-languages
'((python . t)))
#+END_SRC
#+RESULTS:
| (python . t) |
* A heading
This works okay:
#+begin_src python :results output :session a
import sys
#+end_src
#+RESULTS:
Try with python3:
#+begin_src elisp
(setq org-babel-python-command "python3"
py-python-command "python3"
)
#+end_src
#+RESULTS:
: python3
works also:
#+begin_src python :results output :session a
import sys
#+end_src
#+RESULTS:
Try using python-mode.el:
#+begin_src elisp
(setq org-babel-python-mode 'python-mode)
(load-file "/usr/share/emacs/site-lisp/python-mode.el")
#+end_src
#+RESULTS:
: t
#+begin_src python :results output :session a
import sys
#+end_src
Gives this *Message*:
org-babel-python-initiate-session-by-key: Symbol's function definition
is void: py-toggle-shells
Do I need to configure something else?
Thanks,
Myles