Utils
list_python_files(directory)
Finds all Python files in a given directory.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
directory |
Path
|
The directory to search for Python files. |
required |
Returns:
Name | Type | Description |
---|---|---|
list |
A list of Path objects for each Python file found. |
Examples:
>>> list_python_files(Path('/home/user/code'))
[Path('/home/user/code/main.py'), Path('/home/user/code/utils.py')]