Convert a path to an absolute path using os.path.abspath. Prefer this over Path.resolve() (see #6523). Prefer this over Path.absolute() (not public, doesn't normalize).
(path: Union[Path, str])
| 657 | |
| 658 | |
| 659 | def absolutepath(path: Union[Path, str]) -> Path: |
| 660 | """Convert a path to an absolute path using os.path.abspath. |
| 661 | |
| 662 | Prefer this over Path.resolve() (see #6523). |
| 663 | Prefer this over Path.absolute() (not public, doesn't normalize). |
| 664 | """ |
| 665 | return Path(os.path.abspath(str(path))) |
| 666 | |
| 667 | |
| 668 | def commonpath(path1: Path, path2: Path) -> Optional[Path]: |
no outgoing calls