Posted inPython modules sys Identifying Operating System with sys.platform Posted inPython modules, sysTags: OS Detection, sys.platform Identify your operating system in Python using sys.platform. Easily write cross-platform code with OS-specific functionality for Windows, macOS, and Linux.