corelp.Path module
- class corelp.Path(path, *args, **kwargs)[source]
Bases:
This function is a wrapper around the pathlib.Path and returns a compatible Path with a windows path copied inside Linux (for WSL)
- Parameters:
path (str of pathlib.Path) – path string to convert to Path.
- Returns:
path – compatible Path.
- Return type:
pathlib.Path
Examples
>>> Path("C:\Users\Name\Documents") PosixPath('/mnt/c/Users/Name/Documents') # under WSL >>> Path("/home/user/project") PosixPath('/home/user/project') # under Linux >>> Path("C:\Users\Name\Documents") WindowsPath('C:/Users/Name/Documents') # under Windows