> Subject: [Tutor] How do use c/c++ methods in Python? > > Function Test(Struct A *a,int b). > I want to use this function in Python,What > should be the firt parameter?
I'm not sure what you are asking here. To use a C++ function/method from Python you will need to write a wrapper around the C++ code, probably using SWIG or some similar tool. Is this what you are trying to do? And if so are you asking how to map the C struct to a Python type within the wrapper? Or are you trying to call the function directly? That won't be possible, although if its a Windows function the ctypes library may help, and may provide guidance on how to translate the struct. Can you clarify what you are trying to achieve? Alan G _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
