1. Georg Brandl
  2. pygments-main
Issue #888 resolved

IDL lexer

Anonymous created an issue

running pygments 1.6 in python 2.7.3 and from the command line, there seems to be no lexer for IDL even though the documentation claims that there is. I tried loading it by name -

>>> from pygment.lexers import IDLLexer

and

>>> from pygments.lexers import (get_lexer_by_name, get_lexer_for_filename, get_lexer_for_mimetype)
>>> get_lexer_by_name('IDL')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 80, in get_lexer_by_name
    raise ClassNotFound('no lexer for alias %r found' % _alias)
pygments.util.ClassNotFound: no lexer for alias 'IDL' found
>>> get_lexer_for_filename('TheProgram.pro')
<pygments.lexers.PrologLexer>
>>> get_lexer_for_mimetype('text/idl')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/pygments/lexers/__init__.py", line 135, in get_lexer_for_mimetype
    raise ClassNotFound('no lexer for mimetype %r found' % _mime)
pygments.util.ClassNotFound: no lexer for mimetype 'text/idl' found

as well as searching for it from the command line:

$ pygmentize -H lexer idl

looking through the list

$ pygmentize -L lexers

(which by the way claims that I'm running Pygments 1.4, although pip and yolk both claim 1.6) and guessing from the file itself

$ pygmentize -N TheProgram.pro

all to no avail

Comments (1)

  1. Log in to comment