The 5DT dataglove already provides you with the current gesture. If you still want to compute it yourself using matlab, then you can use
pymat. Currently, it is only compiled for python 2.2 and requires the NumPy library. However, it is open source, so you can recompile it for python 2.3.