| Server IP : 199.250.200.62 / Your IP : 216.73.216.15 Web Server : Apache System : Linux vps37394.inmotionhosting.com 3.10.0-1160.119.1.vz7.224.4 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64 User : jasonp18 ( 1000) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/cwd/proc/2/cwd/proc/self/root/opt/imh-python/lib/python3.9/site-packages/picotui/ |
Upload File : |
from .screen import Screen
class Context:
def __init__(self, cls=True, mouse=True):
self.cls = cls
self.mouse = mouse
def __enter__(self):
Screen.init_tty()
if self.mouse:
Screen.enable_mouse()
if self.cls:
Screen.cls()
return self
def __exit__(self, exc_type, exc_val, exc_tb):
if self.mouse:
Screen.disable_mouse()
Screen.goto(0, 50)
Screen.cursor(True)
Screen.deinit_tty()
# This makes sure that entire screenful is scrolled up, and
# any further output happens on a normal terminal line.
print()