Question about embedding python in C++
Farshid Lashkari
no at spam.com
Thu Aug 23 13:57:55 EDT 2007
TheShadow wrote:
> When extending python in c/c++ after you register a module is there a
> way in c/c++ to check if they were correctly registered?
>
> Cause I'm having the problem where when I execute the the python
> script it finds the module but none of the functions.
>
Are you calling Py_InitModule(...) in your initmodule function? If so,
Py_InitModule(...) returns a reference to the module object. You can use
this object to double check that your function names exist in the
modules dictionary. Most likely, there is an error in your code. If you
post it, it would be easier to tell what the problem is.
-Farshid
More information about the Python-list
mailing list