def compile_emoticons(emoticons_list):
    emoticons_compiled = []
    for emoticons, image in emoticons_list:
        for emoticon in emoticons:
            context = Context({
                'name': emoticon,
                'image': os.path.join(EMOTICONS_DIRECTORY, image),
                'code': binascii.hexlify(emoticon.encode('utf-8'))})
            emoticons_compiled.append(
                (re.compile(re.escape(emoticon)),
                 EMOTICON_TEMPLATE.render(context).strip())
            )
    return emoticons_compiled
Compile a new list of emoticon tuples.
dataset/ETHPy150Open Fantomas42/django-emoticons/emoticons/settings.py/compile_emoticons