Skip to content

Instantly share code, notes, and snippets.

View gunchev's full-sized avatar

Doncho N. Gunchev gunchev

View GitHub Profile
@gunchev
gunchev / terminalsize.py
Last active December 8, 2021 14:23 — forked from jtriley/terminalsize.py
Get current terminal size on Linux, Mac, and Windows
#!/usr/bin/python
'''
Get width and height of console
works on Linux, OS X, Windows, Cygwin(Windows) originally retrieved from:
http://stackoverflow.com/questions/566746/how-to-get-console-window-width-in-python
updated by Doncho Nikolaev Gunchev <dgunchev@gmail.com> to work with python 2 and 3, make pylint happy.