def looks_like_a_tool(path, invalid_names=[], enable_beta_formats=False):
 looks = False
 if (os.path.basename(path) in invalid_names):
  return False
 if looks_like_a_tool_xml(path):
  looks = True
 if ((not looks) and enable_beta_formats):
  for tool_checker in BETA_TOOL_CHECKERS.values():
   if tool_checker(path):
    looks = True
    break
 return looks

def looks_like_a_tool ( path , invalid_names = [ ] , enable_beta_formats = False ) : looks = False if ( os . path . basename ( path ) in invalid_names ) : return False if looks_like_a_tool_xml ( path ) : looks = True if ( ( not looks ) and enable_beta_formats ) : for tool_checker in BETA_TOOL_CHECKERS . values ( ) : if tool_checker ( path ) : looks = True break return looks
quick check to see if a file looks like it may be a tool file .