(self, funcname, args=None, returns=None, optfunc=None)
return func
Binds the passed argument and return value types to the specified
        function.
Binds the passed argument and return value types to the specified
        function.
Binds the passed argument and return value types to the specified function .
def bind_function(self, funcname, args=None, returns=None, optfunc=None):
        """Binds the passed argument and return value types to the specified
        function."""
        func = getattr(self._dll, funcname, None)
        warnings.warn\
            ("function '%s' not found in %r, using replacement" %
             (funcname, self._dll), ImportWarning)
        if not func:
            if optfunc:
                warnings.warn\
                    ("function '%s' not found in %r, using replacement" %
                     (funcname, self._dll), ImportWarning)
                func = _nonexistent(funcname, optfunc)
            else:
                raise ValueError("could not find function '%s' in %r" %
                                 (funcname, self._dll))
        func.argtypes = args
        func.restype = returns
        return func
def bind_function ( self , funcname , args = None , returns = None , optfunc = None ) : func = getattr ( self . _dll , funcname , None ) warnings . warn ( "function '%s' not found in %r, using replacement" % ( funcname , self . _dll ) , ImportWarning ) if not func : if optfunc : warnings . warn ( "function '%s' not found in %r, using replacement" % ( funcname , self . _dll ) , ImportWarning ) func = _nonexistent ( funcname , optfunc ) else : raise ValueError ( "could not find function '%s' in %r" % ( funcname , self . _dll ) ) func . argtypes = args func . restype = returns return func