[C++-sig] Embedded Python: how to enumerate function names?
Bob Eaton
bob_barb_eaton at yahoo.com
Sun Aug 21 05:49:27 CEST 2005
In my embedded Python C++ code, I have a PyObject* to the module and its
dictionary. From either of these, is there a way to enumerate the
methods/functions defined in that file?
I know I can at least get the function names with (((PyFunctionObject
*)func) -> func_name), but I'm not clear on how to get the PyFunctionObject
pointer to begin with. Is it the Keys or Values or Items of the dictionary?
Also, once I have the function pointer, can I enumerate its parameters and
return type?
And finally, what's the difference between a Function and a Method?
Any help will be greatly appreciated.
Bob
More information about the Cplusplus-sig
mailing list