![]() |
Qucs-S S-parameter Viewer & RF Synthesis Tools
|
Namespaces | |
| namespace | python |
Classes | |
| class | _automodule |
Functions | |
| _fn_matches (fn, glob) | |
| _load_lexers (module_name) | |
| get_all_lexers (plugins=True) | |
| find_lexer_class (name) | |
| find_lexer_class_by_name (_alias) | |
| get_lexer_by_name (_alias, **options) | |
| load_lexer_from_file (filename, lexername="CustomLexer", **options) | |
| find_lexer_class_for_filename (_fn, code=None) | |
| get_lexer_for_filename (_fn, code=None, **options) | |
| get_lexer_for_mimetype (_mime, **options) | |
| _iter_lexerclasses (plugins=True) | |
| guess_lexer_for_filename (_fn, _text, **options) | |
| guess_lexer (_text, **options) | |
Variables | |
| dict | COMPAT |
| dict | _lexer_cache = {} |
| dict | _pattern_cache = {} |
| oldmod = sys.modules[__name__] | |
| newmod = _automodule(__name__) | |
| name | |
pygments.lexers
~~~~~~~~~~~~~~~
Pygments lexers.
:copyright: Copyright 2006-2023 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
|
protected |
Return whether the supplied file name fn matches pattern filename.
|
protected |
Return an iterator over all lexer classes.
|
protected |
Load a lexer (and all others in the module too).
| pip._vendor.pygments.lexers.find_lexer_class | ( | name | ) |
Return the `Lexer` subclass that with the *name* attribute as given by the *name* argument.
| pip._vendor.pygments.lexers.find_lexer_class_by_name | ( | _alias | ) |
Return the `Lexer` subclass that has `alias` in its aliases list, without instantiating it. Like `get_lexer_by_name`, but does not instantiate the class. Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is found. .. versionadded:: 2.2
| pip._vendor.pygments.lexers.find_lexer_class_for_filename | ( | _fn, | |
code = None |
|||
| ) |
Get a lexer for a filename. If multiple lexers match the filename pattern, use ``analyse_text()`` to figure out which one is more appropriate. Returns None if not found.
| pip._vendor.pygments.lexers.get_all_lexers | ( | plugins = True | ) |
Return a generator of tuples in the form ``(name, aliases, filenames, mimetypes)`` of all know lexers. If *plugins* is true (the default), plugin lexers supplied by entrypoints are also returned. Otherwise, only builtin ones are considered.
| pip._vendor.pygments.lexers.get_lexer_by_name | ( | _alias, | |
| ** | options | ||
| ) |
Return an instance of a `Lexer` subclass that has `alias` in its aliases list. The lexer is given the `options` at its instantiation. Will raise :exc:`pygments.util.ClassNotFound` if no lexer with that alias is found.
| pip._vendor.pygments.lexers.get_lexer_for_filename | ( | _fn, | |
code = None, |
|||
| ** | options | ||
| ) |
Get a lexer for a filename. Return a `Lexer` subclass instance that has a filename pattern matching `fn`. The lexer is given the `options` at its instantiation. Raise :exc:`pygments.util.ClassNotFound` if no lexer for that filename is found. If multiple lexers match the filename pattern, use their ``analyse_text()`` methods to figure out which one is more appropriate.
| pip._vendor.pygments.lexers.get_lexer_for_mimetype | ( | _mime, | |
| ** | options | ||
| ) |
Return a `Lexer` subclass instance that has `mime` in its mimetype list. The lexer is given the `options` at its instantiation. Will raise :exc:`pygments.util.ClassNotFound` if not lexer for that mimetype is found.
| pip._vendor.pygments.lexers.guess_lexer | ( | _text, | |
| ** | options | ||
| ) |
Return a `Lexer` subclass instance that's guessed from the text in `text`. For that, the :meth:`.analyse_text()` method of every known lexer class is called with the text as argument, and the lexer which returned the highest value will be instantiated and returned. :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can handle the content.
| pip._vendor.pygments.lexers.guess_lexer_for_filename | ( | _fn, | |
| _text, | |||
| ** | options | ||
| ) |
As :func:`guess_lexer()`, but only lexers which have a pattern in `filenames` or `alias_filenames` that matches `filename` are taken into consideration. :exc:`pygments.util.ClassNotFound` is raised if no lexer thinks it can handle the content.
| pip._vendor.pygments.lexers.load_lexer_from_file | ( | filename, | |
lexername = "CustomLexer", |
|||
| ** | options | ||
| ) |
Load a lexer from a file. This method expects a file located relative to the current working directory, which contains a Lexer class. By default, it expects the Lexer to be name CustomLexer; you can specify your own class name as the second argument to this function. Users should be very careful with the input, because this method is equivalent to running eval on the input file. Raises ClassNotFound if there are any problems importing the Lexer. .. versionadded:: 2.2
| dict pip._vendor.pygments.lexers.COMPAT |