diff --git a/src/Mod/Import/stepZ.py b/src/Mod/Import/stepZ.py index 96fe1ea9ae..fdbe15c832 100644 --- a/src/Mod/Import/stepZ.py +++ b/src/Mod/Import/stepZ.py @@ -21,13 +21,15 @@ import PySide from PySide import QtGui, QtCore import tempfile -___stpZversion___ = "1.3.2" +___stpZversion___ = "1.3.3" if six.PY3: import gzip as gz + import builtins as builtin #py3 else: # six.PY2 import gzip_utf8 as gz + import __builtin__ as builtin #py2 # import stepZ; reload(stepZ); import gzip_utf8; reload(gzip_utf8) @@ -85,7 +87,8 @@ def open(filename): tempdir = tempfile.gettempdir() # get the current temporary directory tempfilepath = os.path.join(tempdir,fname + u'.stp') - with six.builtins.open(tempfilepath, 'wb') as f: #py3 + #with six.builtins.open(tempfilepath, 'wb') as f: #py3 + with builtin.open(tempfilepath, 'wb') as f: #py3 f.write(file_content) #ImportGui.insert(filepath) ImportGui.open(tempfilepath) @@ -110,7 +113,8 @@ def insert(filename,doc): tempdir = tempfile.gettempdir() # get the current temporary directory tempfilepath = os.path.join(tempdir,fname + u'.stp') - with six.builtins.open(tempfilepath, 'wb') as f: #py3 + # with six.builtins.open(tempfilepath, 'wb') as f: #py3 + with builtin.open(tempfilepath, 'wb') as f: #py3 f.write(file_content) ImportGui.insert(tempfilepath, doc) #ImportGui.open(tempfilepath)