https://github.com/likema/lsb_release_ex
LSB release detection module for Debian/Ubuntu and Red Hat series.
https://github.com/likema/lsb_release_ex
Last synced: 4 months ago
JSON representation
LSB release detection module for Debian/Ubuntu and Red Hat series.
- Host: GitHub
- URL: https://github.com/likema/lsb_release_ex
- Owner: likema
- License: gpl-2.0
- Created: 2013-08-14T17:59:16.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2014-06-22T17:20:58.000Z (almost 12 years ago)
- Last Synced: 2025-01-31T10:03:49.546Z (over 1 year ago)
- Language: Python
- Size: 168 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```python
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"))
```