repl.it
@basicer/

CheckTermSize

Python

No description

fork
loading
Files
  • main.py
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import os
os.environ['TERM'] = 'xterm-256color'

from blessings import Terminal
import time
import sys

t = Terminal()
while True:
    sys.stdout.write('\n'.join([
    t.clear(),
    "Width is: " + str(t.width),
    ''.join(['-'] * t.width),
    ''.join([str(x // 10) for x in range(t.width)]),
    ''.join([str(x % 10) for x in range(t.width)])
    
    ]))
    time.sleep(1)