Issue
I have a Python 3.2 program that runs like this:
import platform
sysname = platform.system()
sysver = platform.release()
print(sysname+" "+sysver)
Windows 7
But on Ubuntu and others it returns:
Linux 3.0.0-13-generic
I need something like:
Ubuntu 11.10 or Mint 12
Solution
Try platform.dist
.
>>> platform.dist()
('Ubuntu', '11.10', 'oneiric')
Answered By - Matt Joiner Answer Checked By - Katrina (WPSolving Volunteer)