blob: 6933dbe7cecefc0674a967fd3cd9411b51bb56f7 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
from .out import *
import os
class TermSizeSkeleton:
def __init__(self):
self.Update()
def Update(self):
self.RowsInt, self.ColumnsInt = map(int, os.popen('stty size', 'r').read().split())
def Rows(self, Update=True):
if Update: self.Update()
return self.RowsInt
def Columns(self, Update=True):
if Update: self.Update()
return self.RowsInt
TermSize = TermSizeSkeleton()
|