Fix python bindings with versions older than 2.7 Need fixing on the Capsule usage, the lack of PyBytes, lack of io module and the way to access exception details.