>>> import platform >>> platform.system() 'Windows' >>> platform.release() 'XP' >>> platform.version() '5.1.2600'