python3 compatibility
fix next() function for python2.5 compatibility
Merge pull request #4 from lemanyk/master

python3 compatibility