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?

1 Answer 1

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.

1
  • 2
    In addition, pydoc-info is a very useful addition to elpy/jedi. It integrates seamlessly with info. Commented 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.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.