]> git.ipfire.org Git - thirdparty/kmod.git/blobdiff - libkmod/python/README
configure: Check that provided paths are absolute
[thirdparty/kmod.git] / libkmod / python / README
index 53a238aedc540ae1658721764e43fbea3cddaf7f..75c2636ff7aeb265ae4ccacc427a6296063a7ead 100644 (file)
@@ -3,45 +3,21 @@ 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()
-
->>>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
-
-
+::
+
+  >>> 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")