Print information about a specific template.

def run_info(template):
    """ Print information about a specific template. """
    template.project_name = 'TowelStuff' # fake project name, always the same
    name = template_name_from_class_name(template.__class__.__name__)
    term = TerminalView()
    term.print_info("Content of template {} with an example project " \
          "named 'TowelStuff':".format(term.text_in_color(name, TERM_GREEN)))

    dir_name = None
    for file_info in sorted(template.files(), key=lambda dir: dir[0]):
        directory = file_name = template_name = ''
        if file_info[0]:
            directory = file_info[0]
        if file_info[1]:
            file_name = file_info[1]
        if file_info[2]:
            template_name = '\t\t - ' + file_info[2]
        if (directory != dir_name):
            term.print_info('\n\t' + term.text_in_color(directory + '/', TERM_PINK))
            dir_name = directory

        term.print_info('\t\t' + term.text_in_color(file_name, TERM_YELLOW) + template_name)

    # print substitutions
    try:
        subs = template.substitutes().keys()
        if len(subs) > 0:
            subs.sort()
            term.print_info("\nSubstitutions of this template are: ")
            max_len = 0
            for key in subs:
                if max_len < len(key):
                    max_len = len(key)
            for key in subs:
                term.print_info(u"\t{0:{1}} -> {2}".
                format(key, max_len, template.substitutes()[key]))
    except AttributeError:
        pass