getting linux distro used...

JanC usenet at janc.invalid
Thu Apr 30 17:26:30 EDT 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'.


-- 
JanC



More information about the Python-list mailing list