Port variant py310
Summary Object-oriented filesystem paths (3.10)
Package version 1.0.1
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants py39
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 20 NOV 2021, 04:14:38 UTC
Port created 05 JAN 2018, 02:40:39 UTC
Subpackage Descriptions
single **Attention:** this backport module isn't maintained anymore. If you want to report issues or contribute patches, please consider the [pathlib2] project instead. Description ----------- pathlib offers a set of classes to handle filesystem paths. It offers the following advantages over using string objects: * No more cumbersome use of os and os.path functions. Everything can be done easily through operators, attribute accesses, and method calls. * Embodies the semantics of different path types. For example, comparing Windows paths ignores casing. * Well-defined semantics, eliminating any warts or ambiguities (forward vs. backward slashes, etc.). Requirements ------------ Python 3.2 or later is recommended, but pathlib is also usable with Python 2.7 and 2.6. Install ------- In Python 3.4, pathlib is now part of the standard library. For Python 3.3 and earlier, easy_install pathlib or pip install pathlib should do the trick. Examples -------- Importing the module classes:: >>> from pathlib import * Listing Python source files in a directory:: >>> list(p.glob('*.py')) [PosixPath(''), PosixPath(''), PosixPath('')] Navigating inside a directory tree:: >>> p = Path('/etc') >>> q = p / 'init.d' / 'reboot' >>> q PosixPath('/etc/init.d/reboot') >>> q.resolve() PosixPath('/etc/rc.d/init.d/halt') Querying path properties:: >>> q.exists() True >>> q.is_dir() False Opening a file:: >>> with as f: f.readline() ... '#!/bin/bash\n' Documentation ------------- The full documentation can be read at [Read the Docs ]. Contributing ------------ Main development now takes place in the Python standard library: see the [Python developer's guide], and report issues on the [Python bug tracker]. However, if you find an issue specific to prior versions of Python (such as 2.7 or 3.2), you can post an issue on the [BitBucket project page]. History ------- Version 1.0.1 ^^^^^^^^^^^^^ - Pull request #4: Python 2.6 compatibility by eevee. Version 1.0 ^^^^^^^^^^^ This version brings pathlib up to date with the official Python 3.4 release, and also fixes a couple of 2.7-specific issues. - Python issue #20765: Add missing documentation for PurePath.with_name()
Configuration Switches (platform-specific settings discarded)
PY310 ON Build using Python 3.10 PY39 OFF Build using Python 3.9
Package Dependencies by Type
Build (only) python-setuptools:single:py310
Build and Runtime python310:single:standard
Download groups
main mirror://PYPI/p/pathlib
Distribution File Information
6940718dfc3eff4258203ad5021090933e5c04707d5ca8cc9e73c94a7894ea9f 49298 pathlib-1.0.1.tar.gz
Ports that require python-pathlib:py310
No other ports depend on this one.