Viewing Structure of a Source File
On this page:
Basics
You can examine the structure of the file currently opened in the editor using the Structure tool window or the Structure pop-up window.
By default, PyCharm shows all the classes, methods, etc. presented in the current file.
To have other members displayed, click the corresponding buttons on the toolbar of the Structure tool window.
You can also have class members shown in the Project tool window.
Viewing the structure of a file
To view the file structure, do one of the following
- On the main menu, choose Structure tool window. to show the
- Press Structure tool button to show the Structure tool window.
- Press Alt+7 to show the Structure tool window.
- Press Ctrl+F12 to show the Structure popup.
Viewing members
To have class fields displayed
- Click
on the toolbar of the Structure tool window.
To have inherited members displayed
- Click
on the toolbar of the Structure tool window.
By default, PyCharm shows only methods, constants, and fields defined in the current class. If shown, inherited members are displayed gray.
To have class members shown in the Project tool window
- Turn on the Show members item on the context menu of the Project tool window title bar. If this option is on, the files in the tree that contain classes turn into nodes. When such node is unfolded, the contained classes with their fields, methods, and other members of the selected item are shown.
See Also
Last modified: 20 April 2016