py3: OpenSCAD: use io.open more explicit
This commit is contained in:
@@ -50,7 +50,9 @@ convexity = 'convexity = %d' % conv
|
||||
#***************************************************************************
|
||||
# Radius values not fixed for value apart from cylinder & Cone
|
||||
# no doubt there will be a problem when they do implement Value
|
||||
pythonopen = open
|
||||
if open.__module__ in ['__builtin__', 'io']:
|
||||
pythonopen = open # to distinguish python built-in open function from the one declared here
|
||||
|
||||
|
||||
def center(b):
|
||||
if b == 2:
|
||||
@@ -247,7 +249,7 @@ def export(exportList,filename):
|
||||
# process Objects
|
||||
print("\nStart Export 0.1d\n")
|
||||
print("Open Output File")
|
||||
csg = pythonopen(filename,'w', encoding="utf8")
|
||||
csg = pythonopen(filename,'w')
|
||||
print("Write Initial Output")
|
||||
# Not sure if comments as per scad are allowed in csg file
|
||||
csg.write("// CSG file generated from FreeCAD %s\n" % \
|
||||
|
||||
Reference in New Issue
Block a user