py3: define xrange for python3
this is done in files where the xrange is used. replace this with range once python2 is not supported anymore. issue 0000995
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
# ***************************************************************************
|
||||
|
||||
from __future__ import print_function
|
||||
import sys
|
||||
import FreeCAD
|
||||
# from FreeCAD import Vector
|
||||
import Path
|
||||
@@ -35,6 +36,10 @@ from PathScripts.PathUtils import fmt
|
||||
import ArchPanel
|
||||
|
||||
|
||||
# xrange is not available in python3
|
||||
if sys.version_info.major >= 3:
|
||||
xrange = range
|
||||
|
||||
LOG_MODULE = 'PathDrilling'
|
||||
PathLog.setLevel(PathLog.Level.INFO, LOG_MODULE)
|
||||
PathLog.trackModule('PathDrilling')
|
||||
|
||||
@@ -28,6 +28,11 @@ from PySide import QtCore, QtGui
|
||||
from PathScripts.PathPostProcessor import PostProcessor
|
||||
from PathScripts.PathPreferences import PathPreferences
|
||||
import Draft
|
||||
import sys
|
||||
|
||||
# xrange is not available in python3
|
||||
if sys.version_info.major >= 3:
|
||||
xrange = range
|
||||
|
||||
|
||||
FreeCADGui = None
|
||||
|
||||
@@ -27,6 +27,11 @@ import FreeCAD
|
||||
import Path
|
||||
from PathScripts import PathUtils
|
||||
import PathScripts.PathLog as PathLog
|
||||
import sys
|
||||
|
||||
# xrange is not available in python3
|
||||
if sys.version_info.major >= 3:
|
||||
xrange = range
|
||||
|
||||
LOG_MODULE = 'PathSurface'
|
||||
PathLog.setLevel(PathLog.Level.INFO, LOG_MODULE)
|
||||
|
||||
Reference in New Issue
Block a user