getting linux distro used...

JanC usenet at janc.invalid
Thu Apr 30 23:26:30 CEST 2009

deostroll wrote:

> I just found that you could use platform.system() to get the
> underlying os used. But is there a way to get the distro used...?

Major modern distros support 'lsb_release', I suppose:

$ lsb_release -i -r -c -d
Distributor ID: Ubuntu
Description:    Ubuntu 9.04
Release:        9.04
Codename:       jaunty

If that doesn't work; try '/etc/issue'.


More information about the Python-list mailing list