-
-
Save omeroot/34f87ca989fdfb961e39 to your computer and use it in GitHub Desktop.
for ömer <3
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
import sys | |
import os | |
import time | |
def get_terminal_size(fd=1): | |
try: | |
import fcntl, termios, struct | |
hw = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')) | |
except: | |
try: | |
hw = (os.environ['LINES'], os.environ['COLUMNS']) | |
except: | |
hw = (25, 80) | |
return hw | |
def get_terminal_width(fd=1): | |
if os.isatty(fd): | |
width = get_terminal_size(fd)[1] | |
else: | |
width = 999 | |
return width | |
omer = " _______ __ __ \______ ________________ _ / / /_ __ `__ \ _ \_ ___/ / /_/ /_ / / / / / __/ / \____/ /_/ /_/ /_/\___//_/ ________ _____ ___ __ \___________ ______(_)__________________ _______ __ / / / _ \_ __ `__ \_ /__ ___/ ___/ __ `/_ __ \\ _ /_/ // __/ / / / / / / _ / / /__ / /_/ /_ / / / /_____/ \___//_/ /_/ /_//_/ /_/ \___/ \__,_/ /_/ /_/ " | |
w = 60 | |
h = len(omer)/w | |
Matrix = [[omer[(j*w) + i] for i in range(w)] for j in range(h)] | |
for x in range(get_terminal_width()): | |
for i in range(h): | |
for j in range(0, x): | |
sys.stdout.write(Matrix[i][j]) | |
print "" | |
print "" | |
time.sleep(0.05) | |
os.system('clear') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment