How to get execute buffer by default shell, if shebang specifies a different one?

Asked by Juan A Rodriguez

Hi all,

I've been trying to setup an IPython interpreter in emacs, using python-mode-6.0.5, but everytime I invoke IPython, I got the output in the standard python interpreter[ ... ]

Question information

Language:
English Edit question
Status:
Solved
For:
python-mode.el Edit question
Assignee:
Andreas Roehler Edit question
Solved by:
Andreas Roehler
Solved:
Last query:
Last reply:
Revision history for this message
Best Andreas Roehler (a-roehler) said :
#1

When the file/buffer has a shebang indicating a different Python you want to execute with, use a command explicitly specifying it:

For example M-x py-execute-buffer-ipython will use IPython even if shebang says #! /usr/bin/env python

Precedences: Shebang precedes default py-shell-name, a call of py-execute-buffer-PY-SHELL-NAME precedes shebang

Revision history for this message
Juan A Rodriguez (juant-rodri) said :
#2

Thanks Andreas Roehler, that solved my question.