MerryChristmas
MerryChristmas copied to clipboard
OS with `posix` works not very well
I tried it on my MacBook, but command clear works not very well. It may be a suitable way to use module platform, and i overrided the function of clear.
import termcolor
import random
import time
import datetime
import platform
from os import system, name
from colorama import init
from termcolor import colored
def clear():
name = platform.system()
if name == "Windows":
_ = system("cls")
else:
# Darwin Linux
_ = system("clear")
#def clear():
# # check if windows
# if name == 'nt':
# _ = system('cls')
# # if *nix
# else:
# _ = system('clear')
thank you for feedback i have updated
I have tried once more although I cannot test on a mac, I did test on windows and windows subsystem for linux.