[C++-sig] Fill a python::str with contents of a vector<unsigned char> ?

Embhi Karuche embhi.karuche at gmail.com
Mon Jun 7 03:51:08 CEST 2010


I have a vector<unsigned char> whose contents I would like to copy
into a python::str.
Currently, I am doing:

string temp(myvector.begin(), myvector.end());
python::str data(temp);

How can I skip the intermediate copy?

Thanks


More information about the Cplusplus-sig mailing list