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?

1 Answer 1


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.

  • 2
    In addition, pydoc-info is a very useful addition to elpy/jedi. It integrates seamlessly with info.
    – Pradhan
    Nov 20, 2014 at 22:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.