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.
diff --git a/python/libxml.py b/python/libxml.py
index 117de82..e507e0f 100644
--- a/python/libxml.py
+++ b/python/libxml.py
@@ -77,7 +77,9 @@
ret = self.__io.read()
else:
ret = self.__io.read(len)
- except Exception as e:
+ except Exception:
+ import sys
+ e = sys.exc_info()[1]
print("failed to read from Python:", type(e))
print("on IO:", self.__io)
self.__io == None