aboutsummaryrefslogtreecommitdiff
path: root/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to '__init__.py')
-rw-r--r--__init__.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/__init__.py b/__init__.py
index e01228a..fef84d4 100644
--- a/__init__.py
+++ b/__init__.py
@@ -3,4 +3,21 @@ from .out import *
import os
-rows, columns = map(int, os.popen('stty size', 'r').read().split())
+class TermSizeSkeleton:
+
+ def __init__(self):
+ self.Update()
+
+ def Update(self):
+ self.Rows, self.Columns = map(int, os.popen('stty size', 'r').read().split())
+
+ def Rows(self, Update=True):
+ if Update: self.Update()
+ return self.Rows
+
+ def Columns(self, Update=True):
+ if Update: self.Update()
+ return self.Rows
+
+
+TermSize = TermSizeSkeleton()