How to use the libknot.LIBKNOT_VERSION function in libknot

To help you get started, we’ve selected a few libknot examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github CZ-NIC / knot / python / libknot / control.py View on Github external
def load_lib(path=None):
    """Loads the libknot library."""

    if path is None:
        version = ""
        try:
            from libknot import LIBKNOT_VERSION
            version = ".%u" % int(LIBKNOT_VERSION)
        except:
            pass

        if sys.platform == "darwin":
            path = "libknot%s.dylib" % version
        else:
            path = "libknot.so%s" % version
    LIB = cdll.LoadLibrary(path)

    global CTL_ALLOC
    CTL_ALLOC = LIB.knot_ctl_alloc
    CTL_ALLOC.restype = c_void_p

    global CTL_FREE
    CTL_FREE = LIB.knot_ctl_free
    CTL_FREE.argtypes = [c_void_p]

libknot

Python bindings for libknot

GPL-3.0
Latest version published 26 days ago

Package Health Score

60 / 100
Full package analysis