On Wed, Jan 13, 2010 at 11:00 AM, Simon Pickles <sipick...@googlemail.com> wrote: > Hello, > > I wonder if someone could help me with a tricky conversion between c++ and > python types (well, tricky for me!) > > I have a c++ library that I would like to use in python via Boost::Python > > One function fills a c++ unsigned char* buffer. It has two overloads: > > unsigned char * getPixels(int deviceID); > bool getPixels(int id, unsigned char * pixels); >
In both cases the easiest solution would be create small wrappers around the functions: std::string getPixels(int i ){ ... } and expose it. Another solution would be to use ctypes module to call those functions. In both cases Py++ can help you: http://language-binding.net/pyplusplus/documentation/functions/transformation/transformation.html -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ _______________________________________________ Cplusplus-sig mailing list Cplusplus-sig@python.org http://mail.python.org/mailman/listinfo/cplusplus-sig