Skip to content

Instantly share code, notes, and snippets.

@LeonLenclos
Last active March 27, 2019 15:42
Show Gist options
  • Save LeonLenclos/30ff8f000c52472ef437f33ea48e9c10 to your computer and use it in GitHub Desktop.
Save LeonLenclos/30ff8f000c52472ef437f33ea48e9c10 to your computer and use it in GitHub Desktop.
Fill the terminal with shades of blue.
"""
Fill the terminal with shades of blue.
require the color module (`$ pip install color`).
"""
from random import choice
from shutil import get_terminal_size
from color import cyan, blue, magenta
def draw(f, size):
for _ in range(size):
print(f(), sep='', end='')
print()
def r():
col = choice([blue, cyan, magenta])
return col('▮')
height, width = get_terminal_size()
draw(r, height*width)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment