compileall.compile_path()
compileall.compile_path() is a Python function in the Compileall Module category. Compiles all .py files on sys.path. The syntax is compileall.compile_path(skip_curdir=True, maxlevels=0, force=False, quiet=0, legacy=False, optimize=-1, invalidation_mode=None). Returns: Boolean. A typical example: compileall.compile_path() # Compile everything on path. A close sibling is compileall.compile_dir(), which compiles all .py files in a directory to .pyc bytecode. A close sibling is compileall.compile_file(), which compiles a single .py file to .pyc. More about this category: Bytecode compilation — compile_dir, compile_file, compile_path. Related Compileall Module entries: compileall.compile_dir(), compileall.compile_file(). This page is part of the free Python Reference documentation covering 978+ functions, methods, and modules with examples and parameter details. You can try compileall.compile_path() immediately in the Python playground, look up unfamiliar terms in the glossary, or return to the Python Reference homepage.