You can use make_constructor(untested):
TCurrency* TCurrency_from_Foo( const Foo& ) { return new TCurrency(); }
class_<TCurrency>( "TCurrency" )
.def( "__init__", boost::python::make_constructor( &TCurrency_from_Foo) )
;
The argument to make_constructor is any functor that returns a pointer [1] to the wrapped class.
[1] In fact, the function should return the type of the pointer holder, so if your pointer holder boost::shared_ptr, the function should return boost :: shared_ptr instead of the raw pointer.
source
share