PyCon 2007 Live Blog: Swig Talk

Presented by Monty Taylor of MySQL.

Comparing other solutions, he only really talked about Boost.python. He doesn't like the huge ugly error messages.

Swig, he claims, is no longer slow, hard, or just for perl. It does make a lot of code, which can be interesting to look at.


%module simple
%include "simple.h"
%{
#include "simple.h"
%}

setuptools is Swig aware. That's kind of cool.

C Sucks. ...because of error checking requirements. Maybe so, but it doesn't become less complicated at the boundaries between C++ and python. Swig doen't make things easier here.

Swig allows extension of classes (monkeypatching).


class C {
public:
    class Inner {};
};

Cons: Swig doesn't handle inner classes at all. Overloaded methods are pretty awkward, going from Python back to C++.

typemaps: powerful; need their own talk.

Ran into Shane Geiger. I guess he's living in Austin now.

Swig docs swig python very complete.

Fri, 23 Feb 2007 11:59

Comments: 0

Reader Comments

Add a Comment

  • Only the name field is mandatory. It's hard to keep track of a conversations where everyone is Anonymous.
  • If you choose to leave an email address, it will not be shown on the page.
  • A limited subset of HTML is allowed in your comment.

Name

Email

URL


Comment: (Limited HTML allowed.)