# coding: utf-8 # AUTO-GENERATED FILE -- DO NOT EDIT # OVERRIDES FILE: static-pi-files\2.3\_sreoverride.py CODESIZE = 2 MAGIC = 20031017 copyright = ' SRE 2.2.2 Copyright (c) 1997-2002 by Secret Labs AB ' def getcodesize(): pass def getlower(): pass # BEGIN MANUAL OVERRIDES FROM static-pi-files\2.3\_sreoverride.py class MatchObject: def end(self, group=0): """Return the indices of the end of the substring matched by group; group defaults to zero (meaning the whole matched substring). Return -1 if group exists but did not contribute to the match. For a match object m, and a group g that did contribute to the match, the substring matched by group g (equivalent to m.group(g)) is m.string[m.start(g):m.end(g)] Note that m.start(group) will equal m.end(group) if group matched a null string. For example, after m = re.search('b(c?)', 'cba'), m.start(0) is 1, m.end(0) is 2, m.start(1) and m.end(1) are both 2, and m.start(2) raises an IndexError exception. """ return 1 endpos = 0 def expand(self, template): r""" Return the string obtained by doing backslash substitution on the template string template, as done by the sub() method. Escapes such as "\\n" are converted to the appropriate characters, and numeric backreferences ("\\1", "\\2") and named backreferences ("\g<1>", "\g") are replaced by the contents of the corresponding group.""" return '' def group(self, group1=None, *others): r"""Returns one or more subgroups of the match. If there is a single argument, the result is a single string; if there are multiple arguments, the result is a tuple with one item per argument. Without arguments, group1 defaults to zero (the whole match is returned). If a groupN argument is zero, the corresponding return value is the entire matching string; if it is in the inclusive range [1..99], it is the string matching the corresponding parenthesized group. If a group number is negative or larger than the number of groups defined in the pattern, an IndexError exception is raised. If a group is contained in a part of the pattern that did not match, the corresponding result is None. If a group is contained in a part of the pattern that matched multiple times, the last match is returned. If the regular expression uses the (?P...) syntax, the groupN arguments may also be strings identifying groups by their group name. If a string argument is not used as a group name in the pattern, an IndexError exception is raised. A moderately complicated example: m = re.match(r"(?P\d+)\.(\d*)", '3.14') After performing this match, m.group(1) is '3', as is m.group('int'), and m.group(2) is '14'. """ if 0: return '' else: return () def groupdict(self, default=None): """Return a dictionary containing all the named subgroups of the match, keyed by the subgroup name. The default argument is used for groups that did not participate in the match; it defaults to None.""" return {} def groups(self, default=None): """Return a tuple containing all the subgroups of the match, from 1 up to however many groups are in the pattern. The default argument is used for groups that did not participate in the match; it defaults to None. (Incompatibility note: in the original Python 1.5 release, if the tuple was one element long, a string would be returned instead. In later versions (from 1.5.1 on), a singleton tuple is returned in such cases.)""" return () lastgroup = 0 lastindex = 0 pos = 0 re = None def span(self, group=0): """For MatchObject m, return the 2-tuple (m.start(group), m.end(group)). Note that if group did not contribute to the match, this is (-1, -1). Again, group defaults to zero.""" return (0, 0) def start(self, group=0): """Return the indices of the start of the substring matched by group; group defaults to zero (meaning the whole matched substring). Return -1 if group exists but did not contribute to the match. For a match object m, and a group g that did contribute to the match, the substring matched by group g (equivalent to m.group(g)) is m.string[m.start(g):m.end(g)] Note that m.start(group) will equal m.end(group) if group matched a null string. For example, after m = re.search('b(c?)', 'cba'), m.start(0) is 1, m.end(0) is 2, m.start(1) and m.end(1) are both 2, and m.start(2) raises an IndexError exception. """ return 1 string = '' class RegexObject: """ Holds a compiled regular expression pattern. Methods: match Match the pattern to the beginning of a string. search Search a string for the presence of the pattern. sub Substitute occurrences of the pattern found in a string. subn Same as sub, but also return the number of substitutions made. split Split a string by the occurrences of the pattern. findall Find all occurrences of the pattern in a string. """ def __init__(self, pattern, flags, code, groupindex): pass def findall(self, source): """findall(source) -> list Return a list of all non-overlapping matches of the compiled pattern in string. If one or more groups are present in the pattern, return a list of groups; this will be a list of tuples if the pattern has more than one group. Empty matches are included in the result. """ return [] def match(self, string, pos=0, endpos=None): """match(string[, pos][, endpos]) -> MatchObject or None If zero or more characters at the beginning of string match this regular expression, return a corresponding MatchObject instance. Return None if the string does not match the pattern; note that this is different from a zero-length match. Note: If you want to locate a match anywhere in string, use search() instead. The optional second parameter pos gives an index in the string where the search is to start; it defaults to 0. This is not completely equivalent to slicing the string; the '' pattern character matches at the real beginning of the string and at positions just after a newline, but not necessarily at the index where the search is to start. The optional parameter endpos limits how far the string will be searched; it will be as if the string is endpos characters long, so only the characters from pos to endpos will be searched for a match. """ return MatchObject(self, string, pos, endpos, regs) def search(self, string, pos=0, endpos=None): """search(string[, pos][, endpos]) -> MatchObject or None Scan through string looking for a location where this regular expression produces a match, and return a corresponding MatchObject instance. Return None if no position in the string matches the pattern; note that this is different from finding a zero-length match at some point in the string. The optional pos and endpos parameters have the same meaning as for the match() method. """ return MatchObject(self, string, pos, endpos, regs) def split(self, source, maxsplit=0): """split(source[, maxsplit=0]) -> list of strings Split string by the occurrences of the compiled pattern. If capturing parentheses are used in the pattern, then the text of all groups in the pattern are also returned as part of the resulting list. If maxsplit is nonzero, at most maxsplit splits occur, and the remainder of the string is returned as the final element of the list. """ return [] def sub(self, repl, string, count=0): """sub(repl, string[, count=0]) -> string Return the string obtained by replacing the leftmost non-overlapping occurrences of the compiled pattern in string by the replacement repl. If the pattern isn't found, string is returned unchanged. Identical to the sub() function, using the compiled pattern. """ return '' def subn(self, repl, source, count=0): """subn(repl, string[, count=0]) -> tuple Perform the same operation as sub(), but return a tuple (new_string, number_of_subs_made). """ return ('', 1) __builtins__ = {} __doc__ = None __file__ = 'C:\\src\\ide\\build-files\\static-pi-files\\2.3\\_sreoverride.py' __name__ = '_sreoverride' __package__ = None def compile(pattern, flags, code, groups, groupindex, indexgroup): return RegexObject() re = None # END MANUAL OVERRIDES