Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env python3
- from colorama import Fore, Back, Style, init
- import os, random
- randHlaska = ["Kampaň", "Kalúsek", "Sorry jako"]
- init()
- while True:
- print(Fore.BLUE + "[py@thon ", end='', flush=True)
- print(Fore.YELLOW + "~", end='', flush=True)
- print(Fore.BLUE + "]", end='', flush=True)
- print(Fore.WHITE + "$ ", end='', flush=True)
- com=input()
- co=com.split(' ')
- if (com[len(com) - 1] != ":"):
- if (com == "ls"):
- dirs = next(os.walk('.'))[1]
- files = next(os.walk('.'))[2]
- for a in dirs:
- print(Fore.BLUE + a)
- for a in files:
- print(Fore.WHITE + a)
- elif (com == "exit"):
- exit(0)
- elif (com == "pwd"):
- print(os.getcwd())
- elif (com.startswith("cd")):
- os.chdir(co[1])
- else:
- try:
- exec(com)
- except:
- os.system(com)
- else:
- r = ""
- while(com != ""):
- r = r + com + "\n"
- com = input()
- exec(r)
- print(randHlaska[random.randint(0,2)])
Add Comment
Please, Sign In to add comment