Running a Python script with c++

Does anyone know how to return a parameter to the c++ function being called? If i set my function to type bool, rather than type void, i cannot seem to return properly from python.

This is the return statement on my python function : return bool(Connected)