Phil Thompson wrote:
On Fri, 04 Jun 2010 08:01:42 -0400, Blaine Bell
<[email protected]> wrote:
Hi,

I have a function that I want to wrap in Python that has a "std::vector<> &"argument. Is it possible to set the changes of the c++ object back to the python object? I have mapped this std::vector<> type to a %MappedType, so I can implement %ConvertFromTypeCode and %ConvertToTypeCode. It seems like for all ConvertFromTypeCode blocks they create new objects, but how do I get the original Python Object inside this block so I can change it? (I probably need to check to see if its available first?)

The nearest you can get is something like...

    void foo(std:vector<int> & /In,Out/);

...then in Python...

    lst = foo(lst)

Phil
That's good to know. This is very similar to what I used as a work-around. Thanks!!!

Blaine
_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to