PyCharm 2019.3 Help

Configuring Project Structure

To access project structure, open Settings / Preferences Dialog by pressing Ctrl+Alt+S or by choosing File | Settings for Windows and Linux or PyCharm | Preferences for macOS, then expand the Project node, and select Project Structure.

In PyCharm, content is a collection of files with which you are currently working, possibly organized in a hierarchy of subfolders. The top-level folder of a project is its content root.

Within a content root, PyCharm can distinguish between the folders that contain source code, and the ones to be ignored while searching, parsing, watching and so on. To distinguish different types of folders, mark any folder below a content root as a source folder or as excluded.

  • Source roots the Source root icon contain the actual source files and resources. PyCharm uses the source roots as the starting point for resolving imports

  • Resource roots the Resources root icon are intended for resource files in your application (images, Style Sheets, and so on). By assigning a folder to this category, you tell PyCharm that files in it and in its subfolders can be referenced relative to this folder instead of specifying full paths to them.

  • Template roots the Template Folder icon contain templates for the various web projects.

  • Excluded roots the Excluded root icon contain files and folders ignored by PyCharm when indexing, searching, parsing, watching, and so on.

Last modified: 5 December 2019