This repository has been archived by the owner. It is now read-only.
Python bindings for kmod
Python
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
kmod
.gitignore MANIFEST.in: add missing source to the sdist tarball. Oct 19, 2012
.mailmap
.update-copyright.conf .update-copyright.conf: update to pipe separators. Dec 14, 2012
AUTHORS
COPYING update FSF address in COPYING and COPYING.LESSER Apr 17, 2012
COPYING.LESSER
MANIFEST.in MANIFEST.in: add AUTHORS to distibuted source files. Dec 14, 2012
README Update README Dec 14, 2012
README.rst README.rst: add .rst symlink for GitHub. Oct 19, 2012
setup.py Issue #15: resovled by using setuptools_cython Apr 2, 2013

README.rst

python-kmod

Python bindings for kmod/libkmod

kmod is a set of tools to handle common tasks with Linux kernel modules like insert, remove, list, check properties, resolve dependencies and aliases.

These tools are designed on top of libkmod, a library that is shipped with kmod. It can be found at:

http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary

python-kmod is a Python wrapper module for libkmod, exposing common module operations: listing installed modules, modprobe, and rmmod. It is at:

https://github.com/agrover/python-kmod

Example (python invoked as root)

>>> import kmod
>>> km = kmod.Kmod()
>>> [(m.name, m.size) for m in km.loaded()]
[(u'nfs', 407706),
 (u'nfs_acl', 12741)
 ...
 (u'virtio_blk', 17549)]
>>> km.modprobe("btrfs")
>>> km.rmmod("btrfs")

Building

Ensure Python, Cython, and the kmod headers are installed and run:

$ python setup.py build