Did I find the right examples for you? yes no

All Samples(8)  |  Call(4)  |  Derive(0)  |  Import(4)

        def load_kernel(name, exc_if_failed=False):
    rc, err = _load_ko(name)
    if rc:
        if not err:
            err = "Failed to load the %s kernel module." % (name)
        if err[-1] == "\n":
            err = err[:-1]
        if exc_if_failed:
            raise Exception(err)
        


src/p/y/python-iptables-0.3.0/iptc/ip6tc.py   python-iptables(Download)
 
from ip4tc import Rule, Table, IPTCError
from util import find_library, load_kernel
from xtables import (XT_INV_PROTO, NFPROTO_IPV6, xt_align, xt_counters)
 
__all__ = ["Table6", "Rule6"]
 
load_kernel("ip6_tables")

src/p/y/python-iptables-0.3.0/iptc/ip4tc.py   python-iptables(Download)
import weakref
 
from util import find_library, load_kernel
from xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
                     xt_align, xt_counters, xt_entry_target, xt_entry_match)
 
__all__ = ["Table", "Chain", "Rule", "Match", "Target", "Policy", "IPTCError"]
 
load_kernel("ip_tables")

src/p/y/python-iptables-HEAD/iptc/ip6tc.py   python-iptables(Download)
 
from ip4tc import Rule, Table, IPTCError
from util import find_library, load_kernel
from xtables import (XT_INV_PROTO, NFPROTO_IPV6, xt_align, xt_counters)
 
__all__ = ["Table6", "Rule6"]
 
load_kernel("ip6_tables")

src/p/y/python-iptables-HEAD/iptc/ip4tc.py   python-iptables(Download)
import weakref
 
from util import find_library, load_kernel
from xtables import (XT_INV_PROTO, NFPROTO_IPV4, XTablesError, xtables,
                     xt_align, xt_counters, xt_entry_target, xt_entry_match)
 
__all__ = ["Table", "Chain", "Rule", "Match", "Target", "Policy", "IPTCError"]
 
load_kernel("ip_tables")