Replaced 'xrange' by 'range' to maintain Python 3.x compatibility.
Merge pull request #415 from olitheolix/master

Replaced 'xrange' by 'range' to maintain Python 3.x compatibility.