Enhancement - Pathlib Support for Tools
- Dominant language
- No language data
- Stars
- 57
- Forks
- 5
- PR merge metrics
- No merged PRs in 30d
Description
Pathlib is a modern Python library for handling filepath/pathing and has been part of the standard Python library since approximately 2014 (Python 3.4). More than a decade later, my hope is that ArcPy be enhanced to accept Paths as inputs.
Currently, as of ArcGIS Pro 3.4, the utilization of Paths creates a runtime error which could be difficult for new ArcPy users to decipher; the workaround is to wrap all paths in a `str()` function. This is doable but clutters up development. The alternative is to do things the old-fashioned way with strings only which is a bummer.
This enhancement request is to provide the necessary functionality for file inputs as `pathlib.Path` type.
[c. 2020 Add support for pathlib.Path objects to arcpy](https://community.esri.com/t5/python-ideas/add-support-for-pathlib-path-objects-to-arcpy/idi-p/933118)
[c. 2021 Using pathlib with SearchCursor](https://community.esri.com/t5/python-questions/using-pathlib-with-searchcursor/td-p/1072120)
Contributor guide
Assessment
This issue has not been assessed yet.