Created
August 1, 2016 11:09
-
-
Save dusansimic/e3b8603111b2781461822cfc4a907a68 to your computer and use it in GitHub Desktop.
Small python script for clearing console window.
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
import os | |
import sys | |
if sys.platform() == "win32": | |
def clear(): os.system("cls") | |
elif sys.platform() == "linux2": | |
def clear(): os.system("clear") | |
elif sys.platform() == "cygwin": | |
def clear(): os.system("clear") | |
elif sys.platform() == "darwin": | |
def clear(): os.system("clear") | |
elif sys.platform() == "freebsd7": | |
def clear(): os.system("clear") | |
elif sys.platform() == "freebsd8": | |
def clear(): os.system("clear") | |
else: | |
print("Unknown platform : could not define clear() function!") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment