Skip to content

Add support for python Path as io.Series argument #1723

@titoiride

Description

@titoiride

As a very simple addition, it would be nice to be able to pass the path to an openPMD series as a python Path object rather than just a pure string.
As a convenient handle for paths, I believe it may be sometimes used in scripting.

Don't be afraid to add code examples!
Python:

import openpmd_api as io
from pathlib import Path

basefolder = Path("base_folder")
diagpath = basefolder.joinpath("path/to/diags")

series = io.Series(diagpath, io.Access.read_only)
# ...

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions