Hello Denis,
>> I'm trying to embed Python in a C application.
>> What I didn't find is how to create an instance once I have a class object.
>
> Class is a callable object. Just call it to create instance.
> ...
> obj = PyObject_CallObject(A, NULL);
Thanks.
After grepping the Python sources I
On Sun, 19 Jun 2005 10:29:53 +0300
Miki Tebeka <[EMAIL PROTECTED]> wrote:
> I'm trying to embed Python in a C application.
> What I didn't find is how to create an instance once I have a class object.
Class is a callable object. Just call it to create instance.
> I'd like to do the equivalent o
Hello All,
I'm trying to embed Python in a C application.
What I didn't find is how to create an instance once I have a class object.
I'd like to do the equivalent of:
from a import A
obj = A()
obj.foo(10)
The following code omits error checking for clarity.
--- a.py ---
class A: