hubflow support of pathlib.Path

Issue #529 resolved
Benjamin Jakimow created an issue

Since Python 3.4 the pathlib module “offers classes representing filesystem paths with semantics appropriate for different operating systems“.

It would be nice if the hubflow is capable to account for this and, e.g. converts pathlib.Path objects automatically into str where it might be required.

# let this be a valid file path
import pathlib
path = pathlib.Path(r'C:\myimage.img')

from hubflow.core import Raster
# fails
Raster(path)

# works (.as_posix() returns a string)

Paster(path.as_posix())

Comments (2)

  1. Log in to comment