From 2c3bbe041a9f1df4c68d534e8af27e251f7fc172 Mon Sep 17 00:00:00 2001 From: Steven Thompson Date: Sun, 27 Mar 2016 20:12:22 +0100 Subject: [PATCH] Set xrange to range for Python 3.0 and above --- port/PyAssimp/pyassimp/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/port/PyAssimp/pyassimp/core.py b/port/PyAssimp/pyassimp/core.py index f035b35e5..a183dc79c 100644 --- a/port/PyAssimp/pyassimp/core.py +++ b/port/PyAssimp/pyassimp/core.py @@ -8,6 +8,11 @@ import sys if sys.version_info < (2,6): raise 'pyassimp: need python 2.6 or newer' +# xrange was renamed range in Python 3 and the original range from Python 2 was removed. +# To keep compatibility with both Python 2 and 3, xrange is set to range for version 3.0 and up. +if sys.version_info >= (3,0): + xrange = range + import ctypes import os