KCH KCH - 1 year ago 118
C++ Question

boost::python::list length

Is there any way to calculate length of list passed from python to C++? I want do do
something like this, but list class lacks

(or anything similar) method:

class Awesome{
void awesomeMethod(const boost::python::list& list_of_something){
list_of_something.length() // suprisingly there's no such method

Answer Source

Like Python, you should use the free function len() to get the length. Try

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download