always getting 'None' return value from PyObject_CallObject

Gal Aviel galaviel at yahoo.com
Mon Mar 24 11:24:43 CET 2008


problem fixed ...
my bad.
I was using a dispatch mechanism where the C code always called the same python
dispatch function, with the actual function name to invoke as arguments.
Anyway, I forgot the 'return' statement.
The code is below.
Many thanks and apologies for the help provided :)

def dispatch(*args):
    #print "Dispatch: args are "
    #print args[1:]
    global_dict = globals()
    return global_dict[args[0]](args[1:])





More information about the Python-list mailing list