android13/external/kmod/libkmod/python
liiir1985 7f62dcda9f initial 2024-06-22 20:45:49 +08:00
..
kmod initial 2024-06-22 20:45:49 +08:00
README initial 2024-06-22 20:45:49 +08:00

README

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")