wrapping a C++ class

Alex Martelli aleaxit at yahoo.com
Fri Jun 15 06:37:46 EDT 2001

"Enrico Ng" <ng at fnmail.com> wrote in message
news:9gba7n$8jj$1 at info1.fnal.gov...
> I am trying to wrap a simple C++ class like this:
>  class mymath {
>  int x, y;
> public:
>   void set_values(int a, int b) {x=a;y=b;}
>   int add(void) {return (x+y);}};
> The thing is, I'm not sure how to wrap this.  I am assuming the self is

www.boost.org offers the Boost Python library, making this quite easy.


More information about the Python-list mailing list