Within a content root, PyCharm can distinguish between the folders that contain source code, and the ones to be ignored while searching, parsing, watching etc. To do so, you can mark any folder below a content root as a source folder, or as excluded so it becomes invisible for PyCharm.

In this section:

  1. Open the Project Structure settings.
  2. In the Projects pane of the Project Structure page, click the project you want to configure content roots for.
  3. In the Content roots pane of the Project Structure page, click the desired content root. The directories under this content root are displayed as a tree view in the right-hand pane.
  4. Select the directory you want to mark and do one of the following:
    • Click one of the icons on top to assign the desired status to this directory.
    • Choose the corresponding status command on the context menu of the directory.

    py_markContentRoot.png

Alternatively, invoke the context menu command from the Project Tool Window. Right-click the directory in question, choose Mark Directory As node, and choose Mark as <directory status>.

Alternatively, invoke the context menu command from the Project Tool Window. Right-click the directory in question, choose Mark Directory As node, and choose Unmark as <directory status>.

See Also

Concepts:

Procedures:

Web Resources: