This works, and I can import vector_foo in Python. However, when I send a vector_foo as an argument to the function mentioned above, I get a TypeError. Neither am I able to populate vector_foo with Foo.

Does the fact that you define the typdef before %include matter? I would have assumed you need to define it after just like you do in the %{ ... %}, where it comes after the #include
–
spencerlyon2May 22 '13 at 20:58