[C++-sig] python extension - std::set

Karl Kobata karl.kobata at syncira.com
Mon Aug 6 05:50:36 CEST 2007


I have created an extension to my python 2.5 installation on winxp and rel3
linux.  I have used C++ set and deque constructs in the interface and am
looking for help python construct required to access the extension.

 

1) My interface has the following:

 

class TestApp {

public:

            // constructors, destructors

            TestApp ();

            ~ TestApp ();

            

            // data members

            // ====>  data members manipulated by C++/Python programs  <====

            std::string sString1;

            std::set<std::string> stSetString1;

            std::set<std::string> stSetString2;

 

            std::deque<std::string> dqDequeString;

}

 

2) have used swig 1.3 to create a wrapper

3) this extension was compiled with distutils

 

In python, how will I access and modify the std::set and std::deque?

Does anyone have examples to do this?

Please help.

 

k

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20070805/3262f1f3/attachment.htm>


More information about the Cplusplus-sig mailing list