| ||||||
not able to access accessor function generated by Posted by varun (varun), 4 June 2007 i m learning python language and 'm just getting started with swig and quickly ran into my first problem. struct Vector { double x,y,z; }; I created a test.h file which includes only this definition every thing went successfully while compiling but i m not able to access the accessor functions automatically generated by swig following error message is displayed >>> struct_vector.vector.x.get() Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'property' object has no attribute 'get' the swig generated function for variable x looks like Code:
please help is there something i should write into .i (interface file) Code:
Posted by admin (Graham Ellis), 5 June 2007 I notice that you're just "learning the Python language" .... and I have to say that SWIG (interfacing it to C) is really not where I would have chosen to start .We do a lot - a VERY great deal - of worth with Python here, but the C interfacing stuff is something that crops up about as often as a blue moon and I really don't feel qualified to offer good advise. Do you really need to interface via SWIG? This page is a thread posted to the opentalk forum
at www.opentalk.org.uk and
archived here for reference. To jump to the archive index please
follow this link.
| ||||||
PH: 01144 1225 708225 • FAX: 01144 1225 793803 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho |