if os.name == "nt" or os.name == "dos": clearCommand = "cls" print "You are using a Windows system." elif os.name == "posix": # UNIX-compatible system clearCommand = "clear" print "You are using a UNIX-compatible system." else: sys.exit( "Unsupported OS" )
printInstructions( clearCommand )
Related Scripts with Example Source Code in same category :