Skip to content

Instantly share code, notes, and snippets.

@thekad
Created December 23, 2014 00:59
Show Gist options
  • Save thekad/7291896ea1609efb42d0 to your computer and use it in GitHub Desktop.
Save thekad/7291896ea1609efb42d0 to your computer and use it in GitHub Desktop.
In [11]: x
Out[11]: <pygments.lexers.RstLexer>
In [12]: x.name
Out[12]: 'reStructuredText'
In [13]: lexers.get_lexer_by_name(x.name)
---------------------------------------------------------------------------
ClassNotFound Traceback (most recent call last)
<ipython-input-13-1e0731e95ff2> in <module>()
----> 1 lexers.get_lexer_by_name(x.name)
/usr/lib/python2.7/site-packages/pygments/lexers/__init__.pyc in get_lexer_by_name(_alias, **options)
78 if _alias in cls.aliases:
79 return cls(**options)
---> 80 raise ClassNotFound('no lexer for alias %r found' % _alias)
81
82
ClassNotFound: no lexer for alias 'reStructuredText' found
@dsmith
Copy link

dsmith commented Dec 23, 2014

Do you know how computers work?

@thekad
Copy link
Author

thekad commented Dec 23, 2014

They don't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment