]>
Commit | Line | Data |
---|---|---|
3aa27ba9 AG |
1 | python-kmod |
2 | =========== | |
3 | ||
31aa6834 | 4 | Python bindings for kmod/libkmod |
3aa27ba9 | 5 | |
3aa27ba9 AG |
6 | python-kmod is a Python wrapper module for libkmod, exposing common |
7 | module operations: listing installed modules, modprobe, and rmmod. | |
8 | It is at: | |
9 | ||
3aa27ba9 AG |
10 | Example (python invoked as root) |
11 | -------------------------------- | |
12 | ||
028fc127 TK |
13 | :: |
14 | ||
15 | >>> import kmod | |
16 | >>> km = kmod.Kmod() | |
9ebfb9c1 AG |
17 | >>> [(m.name, m.size) for m in km.loaded()] |
18 | [(u'nfs', 407706), | |
19 | (u'nfs_acl', 12741) | |
028fc127 | 20 | ... |
9ebfb9c1 | 21 | (u'virtio_blk', 17549)] |
028fc127 TK |
22 | >>> km.modprobe("btrfs") |
23 | >>> km.rmmod("btrfs") |