S
stash
I have the following struct in my c header file:
typedef struct _Foobar {
double foo;
double bar[3];
} Foobar;
I have wrapped it in swig and it appears to have worked...
In my python file now:
import foobar
x = foobar.Foobar()
x.foo = 3.14 #works
x.bar = (1.2, 2.3, 3.4) #returns an error
What have I gotten confused here? I've tried some things with the
carrays.i, but didn't really get anywhere. What is the proper syntax?
I eventually want to turn x into a byte stream and send it over a
serial port.
typedef struct _Foobar {
double foo;
double bar[3];
} Foobar;
I have wrapped it in swig and it appears to have worked...
In my python file now:
import foobar
x = foobar.Foobar()
x.foo = 3.14 #works
x.bar = (1.2, 2.3, 3.4) #returns an error
What have I gotten confused here? I've tried some things with the
carrays.i, but didn't really get anywhere. What is the proper syntax?
I eventually want to turn x into a byte stream and send it over a
serial port.