When I do next(ByteIter, '')<<8 in python, I got a name error saying

"global name 'next' is not defined"

I'm guessing this function is not recognized because of python version?  My version is 2.5.
though you could call ByteIter.next() in 2.6. This is not recommended however, as the method has been renamed in python 3 to next().
Python: next() is not recognized