]> git.ipfire.org Git - thirdparty/kmod.git/blame - libkmod/python/README
python: README: cleanup reStructuredText syntax.
[thirdparty/kmod.git] / libkmod / python / README
CommitLineData
3aa27ba9
AG
1python-kmod
2===========
3
31aa6834 4Python bindings for kmod/libkmod
3aa27ba9 5
31aa6834
AG
6kmod is a set of tools to handle common tasks with Linux kernel modules like
7insert, remove, list, check properties, resolve dependencies and aliases.
8
9These tools are designed on top of libkmod, a library that is shipped with
10kmod. It can be found at:
3aa27ba9
AG
11
12http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
13
14python-kmod is a Python wrapper module for libkmod, exposing common
15module operations: listing installed modules, modprobe, and rmmod.
16It is at:
17
18https://github.com/agrover/python-kmod
19
20Example (python invoked as root)
21--------------------------------
22
028fc127
TK
23::
24
25 >>> import kmod
26 >>> km = kmod.Kmod()
27 >>> km.loaded_modules()
28 [('nfs', 407706),
29 ('nfs_acl', 12741)
30 ...
31 ('virtio_blk', 17549)]
32 >>> km.modprobe("btrfs")
33 >>> km.rmmod("btrfs")
3aa27ba9
AG
34
35Building
36--------
37
028fc127 38Ensure Python and kmod headers are installed and run::
3aa27ba9 39
028fc127 40 $ python setup.py build