Hello,
Sorry to reiterate but if it's not the right forum to send this kind of
message, I would really appreciate that sb tells me where to post it,
because I'm stuck.
Thanks for helping
Lana
/*****************************/
Hello,
I am using boost for the first time.
I have the following boost.cpp file:
#include "../confDBAPIpython/test1.h"
#include
#include
#include
#include
#include
using namespace boost::python;
BOOST_PYTHON_MODULE(confDBAPIpython)
{
// Compile check only...
class_("IntVec")
.def(vector_indexing_suite());
class_std::string >("StringVec")
.def(vector_indexing_suitestd::string >());
def("DBConnexion",PyDBConnexion);
def("DBDeconnexion",PyDBDeconnexion);
def("GetDeviceTypeRow",PyGetDeviceTypeRow);
def("GetDeviceRow_devicename",PyGetDeviceRow_devicename);
def("GetDeviceRow_deviceid",PyGetDeviceRow_deviceid);
def("GetDetailedConnectivityBetweenDevices",PyGetDetailedConnectivityBet
weenDevices);
def("GetConnectivityBetweenDevices",PyGetConnectivityBetweenDevices);
}
The two last fct returns vectorstd::string.
When I try to use them in python, I have the following error message:
list_str=libconfDBAPIpython.GetConnectivityBetweenDevices("TFC","THOR_00
","ECAL_L1FE06_02_00");
print list_str[0];
Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: No Python class registered for C++ class std::string I don't
understand why. I thought it will be handled by the
vector_indexing_suite.
I have no problem when a fcuntion returns a string or a vector<int>
Thanks for helping Lana