1 2 3 4 5
def getOSType(): func = getattr(os, "uname", None) if func == None: return 'win32' return '*nix'