Simple operating system detection method for Python

Download .zip Download .tar.gz View on GitHub

What is OSDetect?

OSDetect is a small python module which is able to get some information about your system and python implementation, like the Operating System or the hardware platform.

Supported operating systems

As of now, only GNU/Linux, Mac OS X and Windows NT are supported. At the moment, I'm working on support for a wider range of operating systems.

Note thst the information available on the different platforms may differ.

Installation instructions

Since OSDetect uses setuptools, you simply need to run

setup.py install

On ArchLinux, you can install OSDetect through the AUR using the package python2-osdetect:

# Using yaourt
yaourt -S python2-osdetect
# Or, do it manually without an AUR helper
wget 'https://aur.archlinux.org/packages/py/python2-osdetect/python2-osdetect.tar.gz'
tar xz python2-osdetect.tar.gz
cd python2-osdetect
makepkg ---clean --syncdeps --install
cd ..
rm -rf python2-osdetect
# In one line
wget -O- -q 'https://aur.archlinux.org/packages/py/python2-osdetect/python2-osdetect.tar.gz' | tar xz; cd python2-osdetect; makepkg -csi; cd ..; rm -rf python2-osdetect