xrootd / xrootd-python

Python bindings for XRootD are now part of the main repository.
https://github.com/xrootd/xrootd
6 stars 8 forks source link

Feature request: glob functionality #19

Closed benkrikler closed 5 years ago

benkrikler commented 5 years ago

Is it reasonable to consider adding glob functionality to the python bindings? I'd be happy to try and implement this myself, but I wanted to check how it would be received and if there were suggested approaches. I imagine this being a new function within the FileSystem module that replicates the standard glob package. Given a path containing wildcards (potentially more than one), a list of files that match this (as per fnmatch) should be returned.

Just some context on why I'd like to do this: I've previously added such functionality into the rootpy project (here), but I now wanted to get such functionality without requiring ROOT to be installed rootpy.

(This is a duplicate of this issue https://github.com/xrootd/xrootd/issues/832, but this seems like the more appropriate repository and I haven't had a response there. I'm happy to close one of these issues if one is more appropriately located than the other)

benkrikler commented 5 years ago

I've implemented this feature into a package I'm working on: https://gitlab.cern.ch/fast-hep/public/fast-curator/blob/master/fast_curator/xrootd_glob.py

I'd be happy to move that implementation back into these python bindings if desirable and then I'd remove the implementation from my own work.

simonmichal commented 5 years ago

Hi Ben, Thanks for taking initiative and sorry for the late response! Actually, python bindings have been integrated into the core, and this repo is not being used any more. So I will close this issue and continue the conversation in your other ticket.

Michal