Created
January 28, 2015 16:50
-
-
Save lordii/57dac361d849cbe2db45 to your computer and use it in GitHub Desktop.
uname with randoms colors
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
#!/usr/bin/env python | |
from subprocess import Popen,PIPE | |
import random | |
colors = ("\033[31m", "\033[32m", "\033[33m", "\033[34m", "\033[35m", | |
"\033[36m" ) | |
reset = "\033[0m" | |
if __name__ == '__main__': | |
p = Popen(["uname", "-rosmn"], stdout=PIPE) | |
out = p.stdout.read() | |
new = out.decode('utf-8') | |
for i in new.split(): | |
print("".join([random.choice(colors),i,reset]),end=" ") | |
print(" ") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment