fr1ll / clip-plot

A WebGL viewer for UMAP-clustered images
https://fr1ll.github.io/clip-plot/
MIT License
2 stars 0 forks source link

Replace glob2 with pathlib.Path.glob #39

Closed fr1ll closed 1 year ago

fr1ll commented 1 year ago

The main feature of glob2 is that it supports recurvsive ** wildcard expansion.

glob.glob supports this now with recursive=True option. Path.glob supports recursive expansion by default.

glob2 also hasn't been updated since 2019.

Let's replace glob2 with Path.glob to remove an unnecessary dependency and to push us more to use Path objects which make other things more convenient.

fr1ll commented 1 year ago

I ran into one issue with Path.glob -- relative paths are not supported.

Python's glob.glob has supported recursive expansion since Python 3.5, however.

I've changed references to glob2 to use glob.glob instead in commit c6e4d04f23acaf0001491e216d8793041af7f6e8