'Generate a python wrapper for functions which pass their
arguments as pointers.'

def _get_python_wrap(self):

    tab = ('    ' * 4)
    (body, callvars) = ([], [])
    for ((intype, _), invar) in zip(self.intypes, self.invars):
        callvars.append('{}    {}'.format(intype, invar))
    line = 'def    _{}_pywrap({}):'.format(self.name, ',    '.join(callvars))
    body.append(line)
    for ((outtype, _), outvar) in zip(self.outtypes, self.outvars):
        line = 'cdef    {}    {}'.format(outtype, outvar)
        body.append((tab + line))
    addr_outvars = map((lambda x: '&{}'.format(x)), self.outvars)
    line = '{}({},    {})'.format(self.name, ',    '.join(self.invars), ',    '.join(addr_outvars))
    body.append((tab + line))
    line = 'return    {}'.format(',    '.join(self.outvars))
    body.append((tab + line))
    body = '\n'.join(body)
    return body
