I would like the Python inferior process to start (if it is not already running) whenever I create a
python-mode buffer (for example, by visiting a .py file).
Some functions in anaconda-mode etc. depend on an inferior Python process running. Also, I want to be able to C-c C-c and see the output.
Everything works fine if I create the
python-mode buffer, then manually run M-x run-python.
However, if I run
(add-hook 'python-mode-hook 'run-python), then create a
python-mode buffer, I get no inferior Python process but this error:
Wrong number of arguments: (1 . 3), 0
I don't know if it's relevant, but I have this in my
(defvar python-shell-interpreter "ipython") (defvar python-shell-interpreter-args "-i")
I had thought that this question would help but it doesn't.
Please could you advise how to create an inferior Python process if it is not already running? Thanks in advance.
- Emacs 24.5.1 (i686-pc-mingw32)
- prelude latest at time of writing
- Python 3.5.1 (Anaconda 2.5.0 64-bit)
- Windows 10