> Now I am faced with wrapping a constructor that takes a > "std::ostream&" as an argument. I don't know how to write a wrapper > for a constructor in boost.python. I'm open to suggestions on this. > For example: > > // C++ API > struct Foo { > Foo(ostream& os); > }; > > # desired python usage > foo = Foo(streambuf(sys.stdout))
Did you already try the usual def(init<ostream&>((arg("os")))) ? I think it should just work (but I haven't actually tried it). Ralf _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig