diff options
author | Jonathan Slenders <jonathan@slenders.be> | 2016-12-29 22:11:35 +0100 |
---|---|---|
committer | Jonathan Slenders <jonathan@slenders.be> | 2016-12-29 22:11:35 +0100 |
commit | f69bc44bf92d041be5280d241ea39a12addede75 (patch) | |
tree | 4cebb2867e23c72ec1827bd47c0ef0b4308589b8 | |
parent | 961f65922cffcd76dd840406df80b2d7224fac56 (diff) |
Added example to docstring of style_from_pygments.
-rw-r--r-- | prompt_toolkit/styles/from_pygments.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/prompt_toolkit/styles/from_pygments.py b/prompt_toolkit/styles/from_pygments.py index cfb0d7c9..0af8c53c 100644 --- a/prompt_toolkit/styles/from_pygments.py +++ b/prompt_toolkit/styles/from_pygments.py @@ -33,6 +33,12 @@ def style_from_pygments(style_cls=pygments_DefaultStyle, Shortcut to create a :class:`.Style` instance from a Pygments style class and a style dictionary. + Example:: + + from prompt_toolkit.styles.from_pygments import style_from_pygments + from pygments.styles import get_style_by_name + style = style_from_pygments(get_style_by_name('monokai')) + :param style_cls: Pygments style class to start from. :param style_dict: Dictionary for this style. `{Token: style}`. :param include_defaults: (`bool`) Include prompt_toolkit extensions. |