A generic class that represents the system’s path flavour (instantiating it creates either a PurePosixPath or a PureWindowsPath):
class pathlib.PurePath(*pathsegments)
>>> PurePath('setup.py') Running on a Unix machine
PurePosixPath('setup.py')
>>> PurePath('foo', 'some/path', 'bar')
PurePosixPath('foo/some/path/bar')
>>> PurePath(Path('foo'), Path('bar'))
PurePosixPath('foo/bar')
>>> PurePath()
PurePosixPath('.')
>>> PurePath('/etc', '/usr', 'lib64')
PurePosixPath('/usr/lib64')
>>> PureWindowsPath('c:/Windows', 'd:bar')
PureWindowsPath('d:bar')
>>> PureWindowsPath('c:/Windows', '/Program Files')
PureWindowsPath('c:/Program Files')