• Home
  • Raw
  • Download

Lines Matching refs:PurePosixPath

26          PurePosixPath, PureWindowsPath, and Path. Further to these four
28 PosixPath subclasses PurePosixPath and Path, and WindowsPath
119 it creates either a :class:`PurePosixPath` or a :class:`PureWindowsPath`)::
122 PurePosixPath('setup.py')
130 PurePosixPath('foo/some/path/bar')
132 PurePosixPath('foo/bar')
137 PurePosixPath('.')
143 PurePosixPath('/usr/lib64')
158 PurePosixPath('foo/bar')
160 PurePosixPath('//foo/bar')
162 PurePosixPath('foo/bar')
164 PurePosixPath('foo/../bar')
166 (a naïve approach would make ``PurePosixPath('foo/../bar')`` equivalent
167 to ``PurePosixPath('bar')``, which is wrong if ``foo`` is a symbolic link
176 .. class:: PurePosixPath(*pathsegments)
181 >>> PurePosixPath('/etc/hosts')
182 PurePosixPath('/etc/hosts')
211 >>> PurePosixPath('foo') == PurePosixPath('FOO')
222 >>> PureWindowsPath('foo') == PurePosixPath('foo')
224 >>> PureWindowsPath('foo') < PurePosixPath('foo')
227 TypeError: '<' not supported between instances of 'PureWindowsPath' and 'PurePosixPath'
240 PurePosixPath('/etc')
242 PurePosixPath('/etc/init.d/apache2')
245 PurePosixPath('/usr/bin')
247 PurePosixPath('/an_absolute_path')
307 from pathlib import PurePath, PurePosixPath, PureWindowsPath
326 >>> PurePosixPath('/etc').drive
342 >>> PurePosixPath('/etc').root
351 :class:`~pathlib.PurePosixPath` collapses them::
353 >>> PurePosixPath('//etc').root
355 >>> PurePosixPath('///etc').root
357 >>> PurePosixPath('////etc').root
378 >>> PurePosixPath('/etc').anchor
404 >>> p = PurePosixPath('/a/b/c/d')
406 PurePosixPath('/a/b/c')
410 >>> p = PurePosixPath('/')
412 PurePosixPath('/')
413 >>> p = PurePosixPath('.')
415 PurePosixPath('.')
420 >>> p = PurePosixPath('foo/..')
422 PurePosixPath('foo')
434 >>> PurePosixPath('my/library/setup.py').name
449 >>> PurePosixPath('my/library/setup.py').suffix
451 >>> PurePosixPath('my/library.tar.gz').suffix
453 >>> PurePosixPath('my/library').suffix
462 >>> PurePosixPath('my/library.tar.gar').suffixes
464 >>> PurePosixPath('my/library.tar.gz').suffixes
466 >>> PurePosixPath('my/library').suffixes
474 >>> PurePosixPath('my/library.tar.gz').stem
476 >>> PurePosixPath('my/library.tar').stem
478 >>> PurePosixPath('my/library').stem
498 >>> PurePosixPath('/a/b').is_absolute()
500 >>> PurePosixPath('a/b').is_absolute()
540 reserved under Windows, ``False`` otherwise. With :class:`PurePosixPath`,
556 >>> PurePosixPath('/etc').joinpath('passwd')
557 PurePosixPath('/etc/passwd')
558 >>> PurePosixPath('/etc').joinpath(PurePosixPath('passwd'))
559 PurePosixPath('/etc/passwd')
560 >>> PurePosixPath('/etc').joinpath('init.d', 'apache2')
561 PurePosixPath('/etc/init.d/apache2')
585 >>> PurePosixPath('b.py').full_match('*.PY')
624 >>> p = PurePosixPath('/etc/passwd')
626 PurePosixPath('etc/passwd')
628 PurePosixPath('passwd')
642 PurePosixPath('../etc/passwd')
730 from pathlib import PurePosixPath
732 class MyPath(PurePosixPath):
770 A subclass of :class:`Path` and :class:`PurePosixPath`, this class