Skip to content

Support pathlib.Path input #48

@dstansby

Description

@dstansby

In calls like f = h4.SD(fname), it would be good to accept a pathlib.Path object as well as a string to pass the filename. Currently doing this raises the error:

  File "/Users/dstansby/github/psipy/psipy/io/mas.py", line 10, in read_hdf
    f = h4.SD(fname)
  File "/Users/dstansby/miniconda3/envs/dev/lib/python3.8/site-packages/pyhdf/SD.py", line 1428, in __init__
    id = _C.SDstart(path, mode)
TypeError: in method 'SDstart', argument 1 of type 'char const *'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions