Question about embedding python in C++

TheShadow theshadowx at gmail.com
Thu Aug 23 14:34:01 EDT 2007


On Aug 23, 11:57 am, Farshid Lashkari <n... at spam.com> wrote:
> 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

Hrmm I forgot about the module init function... I was just calling
Py_initModule()




More information about the Python-list mailing list