Skip to content

LSB release detection module for Debian/Ubuntu and Red Hat series.

License

Notifications You must be signed in to change notification settings

likema/lsb_release_ex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lsb_release_ex

LSB release detection module for Debian/Ubuntu and Red Hat.

Ehanced Linux Standard Base version reporting module for Debian/Ubuntu and Red Hat series. It is inspired by Debian implementaion in lsb-release.

Installation

Install by pip:

pip install lsb_release_ex

or download the latest version from github:

git clone git://github.com/likema/lsb_release_ex.git
cd lsb_release_ex
python setup.py install

Packaging

Ubuntu/Debian

git clone git://github.com/likema/lsb_release_ex.git
cd lsb_release_ex
dpkg-buildpackage -us -uc -rfakeroot

Usage

The sample runs just like

lsb_release -a

in Debian/Ubuntu.

import lsb_release_ex

distinfo = lsb_release_ex.get_distro_information()
verinfo = lsb_release_ex.check_modules_installed()

print '''LSB Version:    %s
Distributor ID: %s
Description:    %s
Release:        %s
Codename:       %s''' % (":".join(verinfo) if verinfo else None,
                         distinfo.get("ID"),
                         distinfo.get("DESCRIPTION"),
                         distinfo.get("RELEASE"),
                         distinfo.get("CODENAME"))

About

LSB release detection module for Debian/Ubuntu and Red Hat series.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages