]> git.ipfire.org Git - thirdparty/kmod.git/blame - libkmod/python/README
configure: Check that provided paths are absolute
[thirdparty/kmod.git] / libkmod / python / README
CommitLineData
3aa27ba9
AG
1python-kmod
2===========
3
31aa6834 4Python bindings for kmod/libkmod
3aa27ba9 5
3aa27ba9
AG
6python-kmod is a Python wrapper module for libkmod, exposing common
7module operations: listing installed modules, modprobe, and rmmod.
8It is at:
9
3aa27ba9
AG
10Example (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")