parameters: (_mime, **options)
docstring: Get a lexer for a mimetype.
docstring_summary: Get a lexer for a mimetype.
docstring_tokens: Get a lexer for a mimetype .
function: def get_lexer_for_mimetype(_mime, **options):
      """
      Get a lexer for a mimetype.
      """
      for modname, name, _, _, mimetypes in itervalues(LEXERS):
          if _mime in mimetypes:
              if name not in _lexer_cache:
                  _load_lexers(modname)
              return _lexer_cache[name](**options)
      for cls in find_plugin_lexers():
          if _mime in cls.mimetypes:
              return cls(**options)
      raise ClassNotFound('no lexer for mimetype %r found' % _mime)
function_tokens: def get_lexer_for_mimetype ( _mime , * * options ) : for modname , name , _ , _ , mimetypes in itervalues ( LEXERS ) : if _mime in mimetypes : if name not in _lexer_cache : _load_lexers ( modname ) return _lexer_cache [ name ] ( * * options ) for cls in find_plugin_lexers ( ) : if _mime in cls . mimetypes : return cls ( * * options ) raise ClassNotFound ( 'no lexer for mimetype %r found' % _mime )