Fix scoping issue with xrange stub

Created a variable prange to prevent shadowing the built in xrange when
working with python2