PyCharm Edu 2018.2 Help

Content Root

In PyCharm Edu, content is a collection of files with which you are currently working, possibly organized in a hierarchy of subfolders. The folder which is the highest in this hierarchy is called the content root folder or content root (shown as icons nodes folder ) for short. A project has at least one content root folder which by default is the project folder itself.

Having several content roots enables you to work with files from several directories that do not have a common immediate parent. This is helpful when you use static contents, for example, icons. You can just save them all in a folder and then specify this folder as an extra content root in several projects.

Content root types

By default, all the files in a content root folder are involved in indexing, searching, parsing, code completion, etc. To change this status, folders within a content root can be assigned to the following categories:

  • Regular content roots, created as described in the section Configuring Content Roots. These roots are marked icons nodes folder svg.

    A content root is a folder that contains the files that make up your project.

  • Source roots (or source folders; shown as Source root ).

    These roots contain the actual source files and resources. PyCharm Edu uses the source roots as the starting point for resolving imports.

    The files under the source roots are interpreted according to their type. PyCharm Edu can parse, inspect, index, and compile the contents of these roots.

  • Excluded roots (shown as Excluded root ) are ones that PyCharm Edu "almost ignores".

    These roots contain files and folders ignored by PyCharm Edu when indexing, searching, parsing, watching etc.

    Excluded roots are not visible to PyCharm Edu. Usually, one would like to exclude temporary build folders, generated output, logs, and other project output. Excluding the unnecessary paths is a good way to significantly improve performance.

Modules without content roots: Collections of dependencies

A module can be used solely as a collection of dependencies for other modules. In such cases, instead of specifying the necessary dependencies separately, you can add the dependency on the corresponding module.

A module used for such purpose, obviously, doesn't need a content root.

Last modified: 9 August 2018

See Also