def search_python(python_code, template_name):
 retval = []
 for (fn, content) in python_code:
  for (ln, line) in enumerate(content):
   if (((u'"%s"' % template_name) in line) or ((u"'%s'" % template_name) in line)):
    retval.append((fn, (ln + 1)))
 return retval

def search_python ( python_code , template_name ) : retval = [ ] for ( fn , content ) in python_code : for ( ln , line ) in enumerate ( content ) : if ( ( ( u'"%s"' % template_name ) in line ) or ( ( u"'%s'" % template_name ) in line ) ) : retval . append ( ( fn , ( ln + 1 ) ) ) return retval
searches python code for a template name .