path#
- path(*args, **kwargs)[source]#
Alias to
pathlib.Path()
with some additional input sanitization:None
entries are removeda list of arguments is converted to separate arguments
Examples:
sc.path('thisfile.py') # Returns PosixPath('thisfile.py') sc.path('/a/folder', None, 'a_file.txt') # Returns PosixPath('/a/folder/a_file.txt')
New in version 1.2.2.New in version 2.0.0: handle None or list argumentsPurePath subclass that can make system calls.
Path represents a filesystem path but unlike PurePath, also offers methods to do system calls on path objects. Depending on your system, instantiating a Path will return either a PosixPath or a WindowsPath object. You can also instantiate a PosixPath or WindowsPath directly, but cannot instantiate a WindowsPath on a POSIX system or vice versa.