platform.dist()¶
-
platform.dist(distname='', version='', id='', supported_dists=('SuSE', 'debian', 'fedora', 'redhat', 'centos', 'mandrake', 'mandriva', 'rocks', 'slackware', 'yellowdog', 'gentoo', 'UnitedLinux', 'turbolinux'))[source]¶ Tries to determine the name of the Linux OS distribution name.
The function first looks for a distribution release file in /etc and then reverts to _dist_try_harder() in case no suitable files are found.
Returns a tuple (distname,version,id) which default to the args given as parameters.