We had the same problem where one module registered converters for type A and B and another module for type B and C. I do not know if Ralf's solution caters for such situations with mixed types.
We ended up having a private map (part of the shared library containing our converters), so a converter gets only registered in Boost-Python if not contained in the map. Cheers, Ger >>> "Ralf W. Grosse-Kunstleve" <r...@yahoo.com> 8/30/2010 8:57 AM >>> > I have to convert std::pair to python tuple in different modules independently. > And these modules may be used concurrently, importing the second module > will report an warning like "std::pair has been already registered". A simple and clean approach is to have another basic module that defines the std::pair conversions, and import that from the two modules you have already. I never import extensions directly, but wrap each in a (possibly trivial) Python module; this has many advantages unrelated to your original question. Then you can simply write: module1.py import basic # e.g. with std::pair converters from module1_ext import * similar for module2.py. Ralf
_______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig