def main(pythonpaths):
    template_dirs = get_template_dirs()
    templates = get_templates(template_dirs)
    python_code = get_python_code(pythonpaths)
    for t in templates:
        # Logic
        form_matches = t.post_form_info()
        num_post_forms = len(form_matches)
        form_lines_without_token = [ln for (ln, has_token) in form_matches if not has_token]
        if num_post_forms == 0:
            continue
        to_search = [rf for rt in t.related_templates() for rf in rt.relative_filenames]
        found = search_python_list(python_code, to_search)

        # Display:
        print t.absolute_filename
        for r in t.relative_filenames:
            print u"  AKA %s" % r
        print u"  POST forms: %s" % num_post_forms
        print u"  With token: %s" % (num_post_forms - len(form_lines_without_token))
        if form_lines_without_token:
            print u"  Without token:"
            for ln in form_lines_without_token:
                print "%s:%d:" % (t.absolute_filename, ln)
        print
        print u"  Searching for:"
        for r in to_search:
            print u"    " + r
        print
        print u"  Found:"
        if len(found) == 0:
            print "    Nothing"
        else:
            for fn, ln in found:
                print "%s:%d:" % (fn, ln)

        print
        print "----"
dataset/ETHPy150Open AppScale/appscale/AppServer/lib/django-1.4/extras/csrf_migration_helper.py/main/original