Skip to content
Please note that GitHub no longer supports old versions of Firefox.

We recommend upgrading to the latest Safari, Google Chrome, or Firefox.

Learn more
This repository has been archived by the owner. It is now read-only.
Backport of pathlib aiming to support the full stdlib Python API. As of January 1 2020, this repository will no longer receive any further updates, as Python 2 is no longer supported.
Python PowerShell
Branch: develop
Clone or download
mcmtroffaes Update README.rst
Clarify that package is now retired since Python 2 has reached its end of life.
Latest commit 91eafa8 Jan 7, 2020

README.rst

pathlib2

appveyor travis-ci codecov

Fork of pathlib aiming to support the full stdlib Python API.

As of January 1 2020, this repository will no longer receive any further updates, as Python 2 is no longer supported.

The old pathlib module on bitbucket is in bugfix-only mode. The goal of pathlib2 is to provide a backport of standard pathlib module which tracks the standard library module, so all the newest features of the standard pathlib can be used also on older Python versions.

Download

Standalone releases are available on PyPI: http://pypi.python.org/pypi/pathlib2/

Development

The main development takes place in the Python standard library: see the Python developer's guide. In particular, new features should be submitted to the Python bug tracker.

Issues that occur in this backport, but that do not occur not in the standard Python pathlib module can be submitted on the pathlib2 bug tracker.

Documentation

Refer to the standard pathlib documentation.

Known Issues

For historic reasons, pathlib2 still uses bytes to represent file paths internally. Unfortunately, on Windows with Python 2.7, the file system encoder (mcbs) has only poor support for non-ascii characters, and can silently replace non-ascii characters without warning. For example, u'тест'.encode(sys.getfilesystemencoding()) results in ???? which is obviously completely useless.

Therefore, on Windows with Python 2.7, until this problem is fixed upstream, unfortunately you cannot rely on pathlib2 to support the full unicode range for filenames. See issue #56 for more details.

You can’t perform that action at this time.