blob: 9498ba070ef3b2fdc8c5f1a79ec37248de714b37 [file] [log] [blame]
Andy Grover3aa27ba2012-03-13 15:00:37 -07001python-kmod
2===========
3
4Python bindings for libkmod
5
6libkmod is a C library to make inserting, removing, and listing
7Linux kernel modules easier. It can be found at:
8
9http://git.kernel.org/?p=utils/kernel/kmod/kmod.git;a=summary
10
11python-kmod is a Python wrapper module for libkmod, exposing common
12module operations: listing installed modules, modprobe, and rmmod.
13It is at:
14
15https://github.com/agrover/python-kmod
16
17Example (python invoked as root)
18--------------------------------
19
20>>>import kmod
21
22>>>km = kmod.Kmod()
23
24>>>km.loaded_modules()
25
26[('nfs', 407706),
27 ('nfs_acl', 12741)
28
29...
30
31 ('virtio_blk', 17549)]
32
33>>>km.modprobe("btrfs")
34
35>>>km.rmmod("btrfs")
36
37Building
38--------
39
40Ensure Python and kmod headers are installed and run:
41
42python setup.py build
43
44