I have a method in c++ that gets called from python and needs to return a python list object.
I have already created the method, and its attached to an exposed class
FWIW, here's a templated function in the same vein as eudoxos' solution:
namespace py = boost::python; template py::list std_vector_to_py_list(const std::vector& v) { py::list l; typename std::vector::const_iterator it; for (it = v.begin(); it != v.end(); ++it) l.append(*it); return l; }