Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import platform
- from time import sleep
- from os import system
- import colorama,platform
- from colorama import init,Fore,Back,Style
- class Colors:
- init()
- sblack = Fore.BLACK
- sred = Fore.RED
- sgreen = Fore.GREEN
- syellow = Fore.YELLOW
- sblue = Fore.BLUE
- swhite = Fore.WHITE
- bgblack = Back.BLACK
- bgred = Back.RED
- bggreen = Back.GREEN
- bgyellow = Back.YELLOW
- bgblue = Back.BLUE
- bgmagenta = Back.MAGENTA
- bgwhite = Back.WHITE
- endc = Style.RESET_ALL
- class magic:
- Clear = lambda: print(chr(27) + "[2J")
- Sleep = lambda s: sleep(s)
- ShowNicely = lambda cl,tw: [ print(cl[i],end="") and sleep(tw) for i in range(len(cl)) ]
- PressKey = lambda eventWord: input(""+eventWord)
- class ClearSaves:
- if ( platform == "Windows" ): (stdout,stderr) = Popen("wclean.bat", cwd=r".").communicate()
- else: system("chmod +x pclean.sh && ./pclean.sh")
- class ShowNicely(Colors):
- def __init__(self):
- self.printer(Colors.sred,Colors.bgblue)
- def printer(self,color,bg):
- print(color+bg+"TEST")
- class vhLines(Colors):
- MINY, MAXY = 1, 24
- MINX, MAXX = 1, 80
- pos = lambda y, x: '\x1b[%d;%dH' % (y, x)
- print(Colors.bgwhite,end="")
- print('%s%s' % (pos(MINY, MINX), ' '*MAXX), end='')
- print('%s%s' % (pos(MAXY, MINX), ' '*MAXX), end='')
- print('%s%s%s%s' % (pos(MINY, MINX), Colors.swhite, Colors.sblack, Colors.endc), end='')
- print(Colors.endc)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement