IntelliJ IDEA 2017.1 Help

Cleaning Python Compiled Files

In this section:

Basics

Depending on the selected Python interpreter, the following Python compiled files are created:

  • .pyc(for Python interpreter)
  • $py.class (for Jython interpreter)

By default, the .pyc and $py.class files are ignored, and thus are not visible in the Project tool window. However, IntelliJ IDEA makes it possible to delete .pyc files from projects or directories.

Please note the following:

  • If you rename or delete a Python file, the corresponding compiled file is also deleted.
  • Python compiled files are deleted recursively.
  • If you perform update from VCS and skip automatic cleanup, then removing Python compiled files is vital. The reason is that after update from version control, some of the Python files could have been deleted, and executing the Clean Python compiled files command will help you get rid of the unnecessary Python compiled files.

Removing Python compiled files

To remove Python compiled files

  1. In the Project tool window, right-click a project or directory, where Python compiled files should be deleted from.
  2. On the context menu, choose Clean Python compiled files.

    The .pyc and $py.class files residing in the selected directory are silently deleted.

See Also

Last modified: 18 July 2017