Sorry for puzzling you!
I want to know how to map the C struct to a Python type within the wrapper or other methods?


From: "Alan G" <[EMAIL PROTECTED]>
To: "terence zhu" <[EMAIL PROTECTED]>,<[email protected]>
Subject: Re: [Tutor] How do use c/c++ methods in Python?
Date: Mon, 29 Aug 2005 11:24:37 +0100

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

_________________________________________________________________
Don’t just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/

_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to