Closed
Description
I have recently started using Python 3's built-in pathlib
module (introduced in PEP 428 for path managing in my projects and I really like it.
I thought that it would be nice if nibabel
accepted PathLike
objects as filenames, instead of only str
or whatever the current behaviour is.
In my code I use wrappers for nib.load
and nib.save
that always transform the filename
argument to str
. That might be naive, but it seems to work. As a reference, matplotlib
uses os.fspath
if the filename argument is PathLike
.
Metadata
Metadata
Assignees
Labels
No labels