summaryrefslogtreecommitdiffstats
path: root/examples/html-input.py
blob: 678652ac3e1e2561801f5ba9a3ce994e4753e7e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
"""
Simple example of a syntax-highlighted HTML input line.
"""
from __future__ import unicode_literals
from pygments.lexers import HtmlLexer
from prompt_toolkit import prompt
from prompt_toolkit.layout.lexers import PygmentsLexer


def main():
    text = prompt('Enter HTML: ', lexer=PygmentsLexer(HtmlLexer))
    print('You said: %s' % text)


if __name__ == '__main__':
    main()