Comment 7 for bug 835151

Revision history for this message
Andreas Roehler (a-roehler) wrote : Re: [Bug 835151] Re: py-shell invoking python not ipython

Am 27.08.2011 17:23, schrieb Terry Jones:
> Looking around in the efun of py-shell and playing inside emacs: I have
> py-shell-name nil and when this is run in py-shell, py-shell-name is set
> to "python".
>
> (when (null py-shell-name)
> (py-toggle-shells py-default-interpreter))
>
> so python (not ipython) ends up getting run later in py-shell with:
>
> (apply 'make-comint py-which-bufname py-shell-name nil args))
>
>
> The doc for py-default-interpreter says:
>
> When the value containes `python', the variables `py-python-command' and
> `py-python-command-args' are consulted to determine the interpreter
> and arguments to use.
>
> But I don't see that in python-mode.el. When py-shell calls py-toggle-shells,
> passing py-default-interpreter as arg, it looks like that will be set to be the
> value of py-shell-name.
>
> So maybe the fix for me is just to (setq py-default-interpreter
> "ipython")
>
> Yes, just checked, that solves the problem& I now get ipython running in the
> *Python* buffer.
>

Great. Looks like we should write a defcustom nearby...

Cheers,

Andreas