def func1(text): for name, regexp in cppRules.items(): matches = regexp.finditer(text) for match in matches: microbe.select(match.start(), match.end()) #print "match", match.start(), match.end() return "ok"
def func00(text): regexp = re.compile('[^/]/\*(.|[\r\n])*?\*/') matches = regexp.finditer(text) for match in matches: microbe.select(match.start(), match.end()) print "match", match.start(), match.end() return "ok"
def func1(text): for name, regexp in regexs.items(): matches = regexp.finditer(text) colors = { 'm' : 1, 'f' : 2, 's' : 3, 'c' : 4, 't' : 5, 'v' : 6 , 'd' : 7} for match in matches: microbe.select(match.start(), match.end(), colors[name.split('####')[1]]) #print "match", match.start(), match.end() return "ok"
def func0(a): print "python '" + a + "'" print microbe.select(7, 12); return "yes"
def func1(text): for range in textRanges: microbe.select(range.start, range.end, range.color) return "ok"
def func1(text): for range in textRanges: #print "colors: select", range.start, range.end, range.color microbe.select(range.start, range.end, range.color) return "ok"