def finddir(o, match, case=False):
 if case:
  names = [(name, name) for name in dir(o) if is_string_like(name)]
 else:
  names = [(name.lower(), name) for name in dir(o) if is_string_like(name)]
  match = match.lower()
 return [orig for (name, orig) in names if (name.find(match) >= 0)]

def finddir ( o , match , case = False ) : if case : names = [ ( name , name ) for name in dir ( o ) if is_string_like ( name ) ] else : names = [ ( name . lower ( ) , name ) for name in dir ( o ) if is_string_like ( name ) ] match = match . lower ( ) return [ orig for ( name , orig ) in names if ( name . find ( match ) >= 0 ) ]
return all attributes of *o* which match string in match .