Brace expansion in python glob
{..}
is known as brace expansion, and is a separate step applied before globbing takes place.
It's not part of globs, and not supported by the python glob function.
Combining globbing with brace expansion.
pip install braceexpand
Sample:
from glob import glob
from braceexpand import braceexpand
def braced_glob(path):
l = []
for x in braceexpand(path):
l.extend(glob(x))
return l
>>> braced_glob('/usr/bin/{x,z}*k')
['/usr/bin/xclock', '/usr/bin/zipcloak']