$NetBSD$

See pkgsrc(7) for build and install instructions.

This is a first cut at getting a python friendly interface to NetBSD
sysctl(3)

API summary:

    sysctl.create("nodename", type, initialvalue)
    sysctl.destroy("nodename")

    where type may be one of the following strings:
    "CTLTYPE_NODE" - indicates an intermediate sysctl node.
    "CTLTYPE_INT" - indicates a node of type integer.
    "CTLTYPE_STRING" - indicates a node of type string.
    "CTLTYPE_QUAD" - indicates a node of type quad. (XXX:    Unimplemented)
    "CTLTYPE_BOOL" - indicates a node of type bool.

    Values are blindly copied out to sysctl(3) compatible C variables, so
    make sure you know what you're doing. 


     value = sysctl.read("nodename")
     sysctl.write("nodename", value);

     'value' will be the appropriate type for sysctl.read(), and
     should be the appropriate type for sysctl.write(). If in doubt,
     use, ask yourself what sysctl(3) would do.

TODO:
     "CTLTYPE_QUAD"
     error message handling/printing needs a second look.
     implement dict = sysctl.list() ?