From: Barry S. <ba...@ba...> - 2010-10-28 20:59:12
|
On 20 Oct 2010, at 19:14, Murali Donthireddy wrote: > Hi Barry, > > I apologize for directly emailing you with a question. Completely understandable if you don't reply. We have a user list that I'm CC'ing. > > I am unable to figure out how to create, in C++ code, an instance of a new style class. The constructor requires a mysterious Py::PythonClassInstance* that I don't know how to generate. You do not call the c'tor directly to create a instance. You have to create instances using python methods. > > The example simple.cxx seems to be the only source of info on about new style classes anywhere on the Internet, short of reading the implementation of PyCXX, but my C++ isn't good enough for that. Have you tried compiling and running simple? It shows the new style class stuff all working. > > Any pointer or example code would be great. simple.cxx is all you need. It shows you how to do most of the interesting stuff. What exactly are you trying to do that simple.cxx does not do? Barry |