mirror of
https://github.com/paradoxxxzero/butterfly.git
synced 2025-01-12 12:28:13 +00:00
29 lines
380 B
Python
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')
|