<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tarbell_list(command, args):
 """ List tarbell projects. """

    with ensure_settings(command, args) as settings:
        projects_path = settings.config.get("projects_path")
        if not projects_path:
            show_error("{0} does not exist".format(projects_path))
            sys.exit()

        puts("Listing projects in {0}\n".format(
            colored.yellow(projects_path)
        ))

        longest_title = 0
        projects = []
        for directory in os.listdir(projects_path):
            project_path = os.path.join(projects_path, directory)
            try:
                filename, pathname, description = imp.find_module('tarbell_config', [project_path])
                config = imp.load_module(directory, filename, pathname, description)
                title = config.DEFAULT_CONTEXT.get("title", directory)
                projects.append((directory, title))
                if len(title) > longest_title:
                    longest_title = len(title)
            except ImportError:
                pass

        if len(projects):
            fmt = "{0: <"+str(longest_title+1)+"} {1}"
            puts(fmt.format(
                'title',
                'project name'
            ))
            for projectname, title in projects:
                title = codecs.encode(title, 'utf8')
                puts(colored.yellow(fmt.format(
                    title,
                    colored.cyan(projectname)
                )))

            puts("\nUse {0} to switch to a project".format(
                colored.green("tarbell switch <project name>")
                ))
        else:
            puts("No projects found")