"""Clean up directory structure by removing __pycache__ and its contents."""

import shutil
import os


ROOT_DIR = '.'
CACHE_DIR = '__pycache__'

for dir_name, sub_dirs, files in os.walk(ROOT_DIR):
    path, file = os.path.split(dir_name)
    if file == CACHE_DIR: ## and os.path.isdir(file):
        shutil.rmtree(dir_name)
