|
From: Bob H. <bh...@co...> - 2015-02-09 16:30:38
|
On 2/9/2015 2:58 AM, alvin wrote: > Hi, > > I'm new to the SWIG and python. I have to call a python function from C and > I want to send the structure as an argument to that function. So I found > something here > <http://forums.indiegamer.com/showthread.php?9464-DX7-slower-than-OpenGL&goto=nextoldest> > . I have tried the programs which have mentioned in that link, but it is not > working properly. It is throwing the following error: > > Traceback (most recent call last): > File "./PyTest.py", line 4, in TestObject > MyProject.MyPrint(o.pName + "\n") > AttributeError: 'SwigPyObject' object has no attribute 'pName' > > > Anyone help me to fix this bug. I was actually able to get the code on page you posted to work, but not without making some minor modifications. I can forward the Visual Studio 2013 console project to you, which includes all the code, if that would help. |