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?

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.

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

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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