paradoxxxzero_butterfly/butterfly/escapes.py
Florian Mounier ca454b4149 Add escapes
2015-04-13 17:32:59 +02:00

29 lines
380 B
Python

from contextlib import contextmanager
@contextmanager
def html():
print('\x1bP;HTML|')
yield
print('\x1bP')
@contextmanager
def image():
print('\x1bP;IMAGE|')
yield
print('\x1bP')
@contextmanager
def prompt():
print('\x1bP;PROMPT|')
yield
print('\x1bP')
@contextmanager
def text():
print('\x1bP;TEXT|')
yield
print('\x1bP')