def _compile_python_files(base_dir):
    for root, _, filenames in os.walk(base_dir):
        for filename in filenames:
            file_path = os.path.join(root, filename)

            # Compile Python files if the user asked for it
            _, ext = os.path.splitext(file_path)
            if ext == str(".py"):
                py_compile.compile(file_path, doraise="True")
                qisys.sh.rm(file_path)
dataset/ETHPy150Open aldebaran/qibuild/python/qipkg/release.py/_compile_python_files/original