Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Detect Linux distribution

Project Description
Simple python 3 module/api to detect Linux distribution.

Table Of contents
-----------------
**** Install On Linux
**** Example
**** More
******** Install from source/git
******** Step By Step example
**** Tested Distributions


**** Install On Linux

sudo pip install detect_linux_distro
or
sudo pip3 install detect_linux_distro

**** Example

from detect_linux_distro.dld import dld
my_linux_name = dld()
my_linux_name.detect()

my_linux_name.print_all_result()

#my_linux_name.get_distro_id()
#my_linux_name.get_distro_name()
#my_linux_name.get_distro_pretty_name()
#my_linux_name.print_all_result()

* Install from source/git

git clone "https://github.com/mlibre/detect_linux_distro.git"
cd detect_linux_distro/
sudo python setup.py install

**** More
******** Step by step example

1. open terminal
2. create a file like test.py on your Linux

touch test.py

3. copy and past this code in test.py

from detect_linux_distro.dld import dld
my_linux_name = dld()
my_linux_name.detect()

my_linux_name.print_all_result()

#my_linux_name.get_distro_id()
#my_linux_name.get_distro_name()
#my_linux_name.get_distro_pretty_name()
#my_linux_name.print_all_result()

4. run code

python3 test.py
or
python test.py

**** Tested Distributions
# arch

note: probably it's work on all distribution, but i don't test.
Release History

Release History

This version
History Node

1.3

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
detect_linux_distro-1.3.tar.gz (4.7 kB) Copy SHA256 Checksum SHA256 Source Feb 12, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting