#!/usr/bin/env python # -*- coding: utf-8 -*- """ This file is part of the web2py Web Framework Copyrighted by Massimo Di Pierro License: LGPLv3 (http://www.gnu.org/licenses/lgpl.html) """ import re # pattern to find defined tables regex_tables = re.compile( """^[\w]+\.define_table\(\s*[\'\"](?P\w+)[\'\"]""", flags=re.M) # pattern to find exposed functions in controller regex_expose = re.compile( '^def\s+(?P_?[a-zA-Z0-9]\w*)\( *\)\s*:', flags=re.M) regex_include = re.compile( '(?P\{\{\s*include\s+[\'"](?P[^\'"]*)[\'"]\s*\}\})') regex_extend = re.compile( '^\s*(?P\{\{\s*extend\s+[\'"](?P[^\'"]+)[\'"]\s*\}\})', re.MULTILINE)