Código Python:
Ver original
#!/usr/bin/python # -*- coding: utf-8 -*- import subprocess, os, random, string, sys, shutil, socket from itertools import cycle, izip class col: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m' FAIL = '\033[91m' ENDC = '\033[0m' BOLD = '\033[1m' UNDERLINE = '\033[4m' def printc(rText, rColour=col.OKBLUE, rPadding=0): print "%s ┌──────────────────────────────────────────┐ %s" % (rColour, col.ENDC) for i in range(rPadding): print "%s │ │ %s" % (rColour, col.ENDC) print "%s │ %s%s%s │ %s" % (rColour, " "*(20-(len(rText)/2)), rText, " "*(40-(20-(len(rText)/2))-len(rText)), col.ENDC) for i in range(rPadding): print "%s │ │ %s" % (rColour, col.ENDC) print "%s └──────────────────────────────────────────┘ %s" % (rColour, col.ENDC) print " " printc("Installation completed!", col.OKGREEN, 2)