I don't know much about SWIG and if it's possible at all, but I would not export such an interface to a nice language like python. I would write a small OO wrapper in C++ around your API and export this interface to Python. I use boost.python for such things, but using SWIG should also be quite easy in this case. regards, Achim