blob: 75c2636ff7aeb265ae4ccacc427a6296063a7ead [file] [log] [blame]
Andy Grover3aa27ba2012-03-13 15:00:37 -07001python-kmod
2===========
3
Andy Grover31aa6832012-03-13 15:06:37 -07004Python bindings for kmod/libkmod
Andy Grover3aa27ba2012-03-13 15:00:37 -07005
Andy Grover3aa27ba2012-03-13 15:00:37 -07006python-kmod is a Python wrapper module for libkmod, exposing common
7module operations: listing installed modules, modprobe, and rmmod.
8It is at:
9
Andy Grover3aa27ba2012-03-13 15:00:37 -070010Example (python invoked as root)
11--------------------------------
12
W. Trevor King028fc122012-10-19 00:10:20 -040013::
Andy Grover3aa27ba2012-03-13 15:00:37 -070014
W. Trevor King028fc122012-10-19 00:10:20 -040015 >>> import kmod
16 >>> km = kmod.Kmod()
Andy Grover9ebfb9c2012-12-14 09:27:36 -080017 >>> [(m.name, m.size) for m in km.loaded()]
18 [(u'nfs', 407706),
19 (u'nfs_acl', 12741)
W. Trevor King028fc122012-10-19 00:10:20 -040020 ...
Andy Grover9ebfb9c2012-12-14 09:27:36 -080021 (u'virtio_blk', 17549)]
W. Trevor King028fc122012-10-19 00:10:20 -040022 >>> km.modprobe("btrfs")
23 >>> km.rmmod("btrfs")