parameters: (*args, **kw)
return_statement: return result
docstring: Returns the list of business templates available at install which can be
      used to setup a catalog storage.
docstring_summary: Returns the list of business templates available at install which can be
      used to setup a catalog storage.
docstring_tokens: Returns the list of business templates available at install which can be used to setup a catalog storage .
function: def getCatalogStorageList(*args, **kw):
    """
      Returns the list of business templates available at install which can be
      used to setup a catalog storage.
    """
    result = []
    bootstrap_dir = getBootstrapDirectory()
    for item in os.listdir(bootstrap_dir):
      if item == '.svn':
        continue
      if item.endswith('.bt5') and os.path.isfile(item):
        # Simple heuristic to make it faster than extracting the whole bt
        if item.endswith('_catalog.bt5'):
          result.append((item, item))
      elif os.path.isdir(os.path.join(bootstrap_dir, item)):
        # Find if the business temlate provides erp5_catalog
        try:
          provides_file = open(os.path.join(bootstrap_dir, item, 'bt', 'provision_list'), 'r')
          provides_list = provides_file.readlines()
          provides_file.close()
        except IOError:
          provides_list = []
        if 'erp5_catalog' in provides_list:
          # Get a nice title (the first line of the description).
          try:
            title_file = open(os.path.join(bootstrap_dir, item, 'bt', 'description'), 'r')
            title = title_file.readline()
            title_file.close()
          except IOError:
            title = item
          result.append((item, title))
    return result
function_tokens: def getCatalogStorageList ( * args , * * kw ) : result = [ ] bootstrap_dir = getBootstrapDirectory ( ) for item in os . listdir ( bootstrap_dir ) : if item == '.svn' : continue if item . endswith ( '.bt5' ) and os . path . isfile ( item ) : # Simple heuristic to make it faster than extracting the whole bt if item . endswith ( '_catalog.bt5' ) : result . append ( ( item , item ) ) elif os . path . isdir ( os . path . join ( bootstrap_dir , item ) ) : # Find if the business temlate provides erp5_catalog try : provides_file = open ( os . path . join ( bootstrap_dir , item , 'bt' , 'provision_list' ) , 'r' ) provides_list = provides_file . readlines ( ) provides_file . close ( ) except IOError : provides_list = [ ] if 'erp5_catalog' in provides_list : # Get a nice title (the first line of the description). try : title_file = open ( os . path . join ( bootstrap_dir , item , 'bt' , 'description' ) , 'r' ) title = title_file . readline ( ) title_file . close ( ) except IOError : title = item result . append ( ( item , title ) ) return result