code: def getPlatformInfo():
    
    if "linux" in sys.platform:
      platform = "linux"
    elif "darwin" in sys.platform:
      platform = "darwin"
    # win32
    elif sys.platform.startswith("win"):
      platform = "windows"
    else:
      raise Exception("Platform '%s' is unsupported!" % sys.platform)
    return platform
docs: Identify platform.