To explain:
>>> def test(a,b,c):
... print "a=%s, b=%s, c=%s" % (a,b,c)
...
>>> def CallPasser( fn, args ):
... print "Args are ", args
... fn (args)
...
>>> CallPasser(test, ('a','b','ccc'))
What I am hoping to get out of the above statement is for the function
test() to be called, as if "test('a','b','ccc')" had been typed at the
prompt.
I have tried "def CallPasser( fn, * args ):", and a couple of other
variations, but always get a TypeError: arg count mismatch.
[Actually, the problem is in C code. Currently, 'C' code calls test()
directly, which works fine. Now, I am trying to make the 'C' code call
CallPasser() instead, which is Python code, which calls the _real_ target of
the callback. But I think the above example is the same as my problem!]
Thanks,
Mark.