File and path utilities.
Function | cd |
Context manager. Change the directory, and restore it afterwards. |
Function | expand |
Expand a list of glob expressions into a list of full paths. |
Function | expand |
Fully expand a path, optionally with an explicit cwd. |
Function | expand |
Fully expand a list of paths, optionally with an explicit cwd. |
Function | expand |
Expand a/b:c/d into [/path/to/a/b, /path/to/c/d]. |
Function | expand |
Expand a space-separated string of filenames passed in as sources. |
Function | is |
Checks if the filename is a pickle file. |
Function | is |
Checks if a pyi file is path/to/dir/__init__.pyi. |
Function | makedirs |
Create a nested directory, but don't fail if any of it already exists. |
Function | recursive |
Call recursive glob iff ** is in the pattern. |
Function | replace |
Undocumented |
Function | replace |
replace `/` with `os.path.sep`, replace `:` with `os.pathsep`. |
Constant | PICKLE |
Undocumented |
Context manager. Change the directory, and restore it afterwards. Example usage: with cd("/path"): ... Arguments: path: The directory to change to. If empty, this function is a no-op. Yields: Executes your code, in a changed directory.
Expand a space-separated string of filenames passed in as sources. This is a helper function for handling command line arguments that specify a list of source files and directories. Any directories in filenames will be scanned recursively for .py files. Any files that do not end with ".py" will be dropped. Args: filenames: A space-separated string of filenames to process. cwd: An optional working directory to expand relative paths Returns: A set of full paths to .py files