Created
June 5, 2016 07:48
-
-
Save Rich700000000000/e529ec4bdc0399a2fdcb73a98866e5cb to your computer and use it in GitHub Desktop.
Makes a new section in the terminal.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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