def split(what): """ >> split <regexp> Sets __matchlist__ to re.split(regexp, page). """ page = browser.get_html() m = re.split(what, page) global_dict, local_dict = get_twill_glocals() local_dict['__matchlist__'] = m
def findall(what): """ >> findall <regexp> Sets __matchlist__ to re.findall(regexp, page). """ page = browser.get_html() regexp = re.compile(what, re.DOTALL) m = regexp.findall(page) global_dict, local_dict = get_twill_glocals() local_dict['__matchlist__'] = m