py3 compatibility fixes
This commit is contained in:
@@ -113,7 +113,7 @@ TOOL_CHANGE = ''''''
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
def processArguments(argstring):
|
||||
|
||||
@@ -35,7 +35,7 @@ now = datetime.datetime.now()
|
||||
SHOW_EDITOR = True
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -106,7 +106,7 @@ TOOL_CHANGE = ''''''
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ now = datetime.datetime.now()
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ else:
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ TOOL_CHANGE = ''''''
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
def processArguments(argstring):
|
||||
|
||||
@@ -99,7 +99,7 @@ SUPPRESS_TOOL_CHANGE=0
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -97,7 +97,7 @@ POST_OPERATION = ''''''
|
||||
TOOL_CHANGE = ''''''
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ POST_OPERATION = ''''''
|
||||
TOOL_CHANGE = ''''''
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
CurrentState = {}
|
||||
|
||||
@@ -55,7 +55,7 @@ AXIS = 'X','Y','Z','A','B' #OpenSBP always puts multiaxis move parameters in th
|
||||
SPEEDS = 'XY','Z','A','B'
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -290,7 +290,7 @@ GCODE_FOOTER = "M30"
|
||||
|
||||
linenr = 0 # variable has to be global because it is used by linenumberify and export
|
||||
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ import Part
|
||||
import PathScripts.PostUtils as PostUtils
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ import Path
|
||||
import FreeCAD
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ TOOL_CHANGE = ''''''
|
||||
|
||||
|
||||
# to distinguish python built-in open function from the one declared below
|
||||
if open.__module__ == '__builtin__':
|
||||
if open.__module__ in ['__builtin__','io']:
|
||||
pythonopen = open
|
||||
|
||||
def processArguments(argstring):
|
||||
|
||||
Reference in New Issue
Block a user