7

I'm trying to get eldoc-mode to work in python-mode. If I enter a python buffer and do

M-x eldoc-mode
M-x python-mode-switch-to-shell

This seems to work for some built-in functions, but mostly doesn't:

  • dir( gives imformation
  • import os gives imformation
  • import subprocess does not
  • A function I define does not

Is there anything else I need to do?

Nathaniel Flath
  • 627
  • 6
  • 13

1 Answers1

8

The default eldoc integration of python.el will show functions defined in the Python shell. If you send the definition of your function to the Python shell in Emacs, eldoc should also show information on that function.

To get better results, you need to use a package that uses a more advanced approach to finding documentation, like elpy or emacs-jedi.

Jorgen Schäfer
  • 3,899
  • 2
  • 17
  • 19
  • 1
    In addition, [pydoc-info](https://bitbucket.org/jonwaltman/pydoc-info/) is a very useful addition to `elpy/jedi`. It integrates seamlessly with `info`. – Pradhan Nov 20 '14 at 22:38