From: Andy Grover Date: Tue, 13 Mar 2012 22:00:37 +0000 (-0700) Subject: python: Add README X-Git-Tag: v17~10^2~39 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3aa27ba9882651a16dfae30daad15480039261e1;p=thirdparty%2Fkmod.git python: Add README --- diff --git a/libkmod/python/README b/libkmod/python/README new file mode 100644 index 00000000..9498ba07 --- /dev/null +++ b/libkmod/python/README @@ -0,0 +1,44 @@ +python-kmod +=========== + +Python bindings for libkmod + +libkmod is a C library to make inserting, removing, and listing +Linux kernel modules easier. 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() + +>>>km.loaded_modules() + +[('nfs', 407706), + ('nfs_acl', 12741) + +... + + ('virtio_blk', 17549)] + +>>>km.modprobe("btrfs") + +>>>km.rmmod("btrfs") + +Building +-------- + +Ensure Python and kmod headers are installed and run: + +python setup.py build + +