Python/C API
Joerg Baumann
joerg.baumann at stud.informatik.uni-erlangen.de
Thu Oct 5 04:42:09 EDT 2000
More information about the Python-list mailing list
Thu Oct 5 04:42:09 EDT 2000
- Previous message (by thread): Python/C API
- Next message (by thread): Python/C API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi,
I´m trying to extend python and I have following problem with the C/API:
Howto make a new instance of a class defined in Python from C?
If I have
<pre>
class foo:
def __init__(self,data):
....
</pre>
how to write
<pre>
f=foo("blabla)
</pre>
in C?
I´m searching for somthing like
PyObject*
f=PyInstace_New(PyString_FromString("foo"),PyString_FromString("data"))
Can anybody help me?
Regards
joerg
- Previous message (by thread): Python/C API
- Next message (by thread): Python/C API
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list