doctestprinter.repr_posix_path

doctestprinter.repr_posix_path(any_path: Union[str, pathlib.Path])str

Represents the path on a Windows machine as a Posix-Path representation turning back slashes to forward slashes.

Examples

>>> repr_posix_path("c:\\a\\path")
'/c/a/path'
>>> repr_posix_path(".\\a\\path")
'./a/path'
>>> repr_posix_path(".\\a\\path")
'./a/path'
Parameters

any_path (str, Path) – Any type of path representation.

Returns

str