#NEWLINE# def __matchingActions( self , searchText , path = '' ) : #NEWLINE# #INDENT# results = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# matcher = re . compile ( '' . join ( [ ( '[%s|%s]' % ( c . upper ( ) , c . lower ( ) ) ) for c in searchText ] ) ) #NEWLINE# for name in self . __searchStructure : #NEWLINE# #INDENT# match = matcher . search ( name ) #NEWLINE# if match : #NEWLINE# #INDENT# for ( item , path ) in self . __searchStructure [ name ] : #NEWLINE# #INDENT# action = self . __buildAction ( item , name , self . __searchMenu ) #NEWLINE# if ( name not in results ) : #NEWLINE# #INDENT# results [ name ] = { #NEWLINE# #INDENT# 'pos' : match . start ( ) , #NEWLINE# 'actions' : [ ] , #NEWLINE# #UNINDENT# } #NEWLINE# #UNINDENT# results [ name ] [ 'actions' ] . append ( ( action , path ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# return results