Adding documentation to spyder (python IDE)

2019-08-03 22:43发布

问题:

So I've been working with the pygame library (in spyder) lately, but I don't have the documentation installed like the built-in library. I've looked around but haven't seen a how-to on getting the pygame documentation or installing it.

Is there a pygame documentation? If so, how do I install it such that I don't have to google the syntax everytime I forget it? If you know, thanks in advance!

The documentation is something that shows the options when you type math. or numpy. like so as well as the syntax and brief explanation like so when you use different functions.

*Note that I have pygame installed, it runs smoothly (executing in a dedicated python interpreter as well).

回答1:

(Spyder dev here) I guess you are trying to consult the documentation from the Editor, right? If that's the case, I have to let you know that it's not possible for us to extract documentation for all Python modules, because of some technical limitations of the libraries we use to do it. The most problematic modules are the ones built with C extensions, like (precisely) Pygame or OpenCV.

We are aware of this situation and are working to solve it in a future release (planned at the moment for 2.3.1, to be released in August) by using a library called jedi.

You can also use the console (either Python or IPython) to obtain the docs. That's the best we can offer you for now :-)