dk7
dk7

Reputation: 333

How to add initialization code to SWIG Python extension

I created a Python extension to a C++ library.

How do I add code to the interface file, to be executed when the module is loaded/imported ?

Thanks,

Upvotes: 0

Views: 487

Answers (1)

dk7
dk7

Reputation: 333

Use %init tag as described in: SWIG Basics - Code insertion

Upvotes: 2

Related Questions