def ciglob(text, patterns):
 if isinstance(patterns, str):
  patterns = (patterns,)
 return glob(text.lower(), [p.lower() for p in patterns])

def ciglob ( text , patterns ) : if isinstance ( patterns , str ) : patterns = ( patterns , ) return glob ( text . lower ( ) , [ p . lower ( ) for p in patterns ] )
case-insensitive version of glob .