From: Adam N. <a.n...@sh...> - 2011-02-19 06:24:21
|
Hi all, I can't seem to figure out how to pass a Python dictionary to a C++ function as an std::map object. Are there any examples showing how this is done? I can't seem to find any at all. My .i file has "%include <std_map.i>" in it, then an %include for all the .h files declaring the maps, but when I run my Python program I get a "TypeError: in method 'MyClass_open', argument 3 of type 'ns::MY_MAP &'" It doesn't seem to convert the dictionary parameter into the C++ std::map type. If anyone can point me toward some examples I would greatly appreciate it! Many thanks, Adam. |