Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python documentation in PyCharm IDE

Tags:

pycharm

I'm having trouble accessing Python documentation from within PyCharm. I tried View | Quick Documentation and it says No Documentation Found. Is there any easy way I can configure this to show the documentation?

To clarify, I'm looking for Python documentation i.e description of the functions/features of the inbuilt libraries, not documentation about PyCharm itself.

like image 856
theblackpearl Avatar asked Apr 17 '16 04:04

theblackpearl


People also ask

How do I document Python code in PyCharm?

To create documentation comment for a Python functionPlace the caret after the declaration of a function you want to document. Type opening triple quotes, and press Enter , or Space . Add meaningful description of parameters and return values.

How do I get function documentation in PyCharm?

Press Ctrl+Q or choose View | Quick Documentation Lookup on the main menu. In the Settings/Preferences dialog ( Ctrl+Alt+S ), go to Editor | General | Code Completion. The Code completion page opens. Select the Show the documentation popup checkbox and specify the elapsed time.

How do I enable docstring in PyCharm?

Press Ctrl+Alt+S and go to Editor | General |Smart Keys. Select the Insert type placeholders checkbox in the Smart Keys page of the editor settings. Place the caret at the function name, and press Alt+Enter . In the list of intention actions that opens, choose Insert documentation string stub.

Is PyCharm good for Python?

PyCharm and VS Code are both excellent tools for writing Python code.


2 Answers

Simply highlight the module you are interested in (either in the editor or under External Libraries folder) and press CTRL+Q.

Normally an external link do the official documentation is displayed. Sometimes even some basic description of the module is available right in the IDE.

like image 81
Nejc Deželak Avatar answered Oct 05 '22 13:10

Nejc Deželak


Usually highlighting the module and pressing Ctrl+Q would work for modules/classes/objects/functions in the standard libraries. You may also try to invoke "help" in the python console, especially if what you want to retrieve is something you need to import first. For example, to get the documentation of the "Workbook", you could type help(openpyxl.Workbook) to learn the details, which simply pressing Ctrl+Q would respond No Documentation Found instead.

like image 45
Shu-Yen Avatar answered Oct 05 '22 12:10

Shu-Yen