The Python pathlib library automatically detects the platform it's running on to construct (Pure)Path objects. This makes sense when operations have to execute system calls (this object class are called "concrete classes" in the documentation). Functionality that appears to be missing is to be able to detect whether a path is a Windows or Posix path. For "C:\home\user\file.txt" and "/etc/" we could do this based on the separators and/or drive. I'm aware that this task is ambigious for relative paths, we constrain ourselves to absolute paths. What would be a valid way to detect the path type in python, preferable in the pathlib context? Continue reading...