summaryrefslogtreecommitdiff
path: root/libkmod/python/README
blob: 75c2636ff7aeb265ae4ccacc427a6296063a7ead (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
python-kmod
===========

Python bindings for kmod/libkmod

python-kmod is a Python wrapper module for libkmod, exposing common
module operations: listing installed modules, modprobe, and rmmod.
It is at:

Example (python invoked as root)
--------------------------------

::

  >>> import kmod
  >>> km = kmod.Kmod()
  >>> [(m.name, m.size) for m in km.loaded()]
  [(u'nfs', 407706),
   (u'nfs_acl', 12741)
   ...
   (u'virtio_blk', 17549)]
  >>> km.modprobe("btrfs")
  >>> km.rmmod("btrfs")