Skip to content

Instantly share code, notes, and snippets.

@Rich700000000000
Created June 5, 2016 07:48
Show Gist options
  • Save Rich700000000000/e529ec4bdc0399a2fdcb73a98866e5cb to your computer and use it in GitHub Desktop.
Save Rich700000000000/e529ec4bdc0399a2fdcb73a98866e5cb to your computer and use it in GitHub Desktop.
Makes a new section in the terminal.
def newSection():
def terminal_size():
import fcntl, termios, struct
h, w, hp, wp = struct.unpack('HHHH',
fcntl.ioctl(0, termios.TIOCGWINSZ,
struct.pack('HHHH', 0, 0, 0, 0)))
return w
ter_int = terminal_size()
print ("\n" + ("_" * (int(ter_int))) + "\n\n")
print ("Hello")
newSection()
print ("World")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment