Embedding Python

Serge Orlov Serge.Orlov at gmail.com
Tue May 9 06:26:04 EDT 2006


gavinpaterson wrote:
> Dear Pythoners,
>
> I am writing as I am having trouble embedding a Python program into a
> Win XP C++ console application.
>
> I have written a script file for importing and I am trying to use the
> example for "Pure Embedding" found in the product documentation.
>
> The program fails to successfully execute past the line:
>
> if (pFunc && PyCallable_Check(pFunc))
>
> I have checked the pFunc pointer at runtime and it is not null so I
> assume that the PyCallable_Check fails.

Looking at the source in "Pure Embedding" I see that it is supposed to
print an error message if PyCallable_Check fails, have you got the
message?




More information about the Python-list mailing list