get terminal size python

Solutions on MaxInterview for get terminal size python by the best coders in the world

showing results for - "get terminal size python"
Emeline
22 Jul 2019
1import os
2
3# you can do like this
4columns, lines = os.get_terminal_size()
5
6# or 
7size = os.get_terminal_size()
8
9columns = size.columns
10lines = size.lines
Lea
07 Jun 2017
1from os import get_terminal_size
2
3size = get_terminal_size() # Columns, Lines