vedo
vedo copied to clipboard
Make load functions compatible with pathlib.Path
Hi !
So far vedo loaders work with filenames as strings, I usually use pathlib.Path
to manage file locations. The current implementation is not compatible as some functions specific to strings are called. What do you think about making it compatible with pathlib.Path
? An easy way would be to convert pathlib.Path
to string and let the rest of the loaders as before, something like that should work:
import os
from pathlib import Path
def load(filename: str | os.PathLike, ...):
is isinstance(filename, Path):
filename = str(filename)
Thanks, Louis