Skip to content

Instantly share code, notes, and snippets.

Avatar
🐶
Just finished today's work

Daniel-Chin

🐶
Just finished today's work
  • NYU Shanghai
View GitHub Profile
@jtriley
jtriley / terminalsize.py
Created Jul 26, 2011
Get current terminal size on Linux, Mac, and Windows
View terminalsize.py
#!/usr/bin/env python
import os
import shlex
import struct
import platform
import subprocess
def get_terminal_size():
""" getTerminalSize()
You can’t perform that action at this time.