Steps to hide “__pycache__”
- Click the “Manage” button in the “Side Bar”.
- Select “Settings” from the menu that appears.
-
Select the scope of the settings on the “Settings” tab. There are “User” and “Workspace” tabs as shown in the image below. If you are not working on a workspace, “Workspace” will not be displayed. The difference between “User” and “Workspace” is shown in the table below (a brief explanation of workspaces is provided in a later chapter).
User Overall settings. If there are settings for Workspace, they will take precedence over Workspace settings. Workspace Settings are only reflected in the workspace being worked on. - Enter “files.exclude” in the search text box at the top of the screen to narrow down the settings items.
- When “Files: Exclude” is displayed in the settings, click the “Add Pattern” button.
-
When a text box for entering patterns is displayed, enter the following pattern and click OK.
**/*.pyc
-
Click the “Add Pattern” button again and enter the following pattern in the text box for pattern input, then click OK.
**/__pycache__
- The cache files will be hidden.
What is a workspace?
A workspace is a collection of folders and files opened in VSCode. Workspaces allow you to manage multiple folders and files together. You can also change settings for each workspace. For example, you can set font size to 14 for workspace A and font size to 16 for workspace B. Workspace settings are made on the “Workspace” tab.Test Environment
- Visual Studio Code Version 1.80.1 (user setup)
- Microsoft Windows 10 Enterprise Version 22H2 OS Build 19045.3086 Experience: Windows Feature Experience Pack 1000.19041.1000.0