#!/usr/bin/env python # -*- coding: utf-8 -*- """ his file is part of a custom distribution of the web2py Web Framework, version 1.99.7, licensed by the copyright holder (Massimo Di Pierro ) to Bosch Rexroth (Germany) for use in embedded devices according to the attached non-exclusive license (web2py-commercial-license-Bosh-2012-07-07.pdf, SHA-1 Hash: 42ed39335a669f6a1ba9a7d169063054b147c49c) The original file distributed with web2py is and remains properly of the copyright holder and licensed under 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*)|(?:_[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)