If you're using python-mode.el
, you can specify the binary to be executed as an inferior process by setting the py-python-command
variable, i.e.:
(setq py-python-command "python3")
Naturally, you'll need to provide the name of the binary as it exists on your system in place of "python3"
, if it differs. In python.el
, the analogous variable to set is python-python-command
.
As far as using pydoc
, there are a few possibilities. First, you can simply execute help()
inside the Python inferior process. If you do choose that option, you might find it useful to add the following code to your .emacs
file:
(setenv "PAGER" "cat")
This is necessary because interactive pagers (e.g., less
, more
, most
, etc.) don't work particularly well inside inferior process buffers. Second, you can install a Texinfo package containing the documentation and use Emacs's info
browser (q.v., Python Programming in Emacs). Finally, if you opt to use python.el
, it includes an interactive function called python-describe-symbol
that can lookup pydoc
help on demand (and I suspect python-mode.el
should have something similar). If you search around a bit, I'm sure you can find other methods and/or third-party packages as well.