LIVVkit / LIVVkit

Land Ice Verification & Validation Toolkit
BSD 3-Clause "New" or "Revised" License
8 stars 5 forks source link

Use pathlib #33

Open jhkennedy opened 6 years ago

jhkennedy commented 6 years ago

Python 3.6+ natively uses pathlib, an object-oriented approach to paths and filenames. This is recommended as it replaces most of the "cumbersome" code from os.path and glob.glob (which use "dumb" string manipulation).

While the module pathlib2 is available lower python versions, there isn't guaranteed support in associated packages (numpy, scipy, etc) as there is in Python 3+ versions.

Therefore, this should happen in tandem with dropping python 2 support.

jhkennedy commented 6 years ago

This will also make some of the functions livvkit.util.functions obsolete (e.g., mkdir_p).