flux.wrapper module

Flux interface wrapper generator. This could, in principle, be used for other projects as well, but it encodes a number of assumptions about the error propagation and handling that flux uses.

class flux.wrapper.ErrorPrinter(name, prefixes)

Bases: object

class flux.wrapper.FunctionWrapper(fun, name, function_type, ffi, add_handle=False)

Bases: object

build_argument_translation_list(fun_type)
set_error_check(fun)
exception flux.wrapper.InvalidArguments(name, signature, arguments)

Bases: ValueError

exception flux.wrapper.MissingFunctionError(name, c_name, name_list, arguments)

Bases: Exception

class flux.wrapper.Wrapper(ffi, lib, handle=None, match=None, filter_match=True, prefixes=(), destructor=None)

Bases: WrapperBase

Forms a wrapper around an interface that dynamically searches for undefined names, and can detect and pass a handle argument of specified type when it is found in the signature of an un-specified target function.

check_handle(name, fun_type)
check_wrap(fun, name)
property handle
class flux.wrapper.WrapperBase

Bases: object

property handle
class flux.wrapper.WrapperPimpl

Bases: WrapperBase

property handle
exception flux.wrapper.WrongNumArguments(name, signature, ftype, arguments, htype)

Bases: ValueError