Fix saving of DXF files (python3)
- Python3 does not allow to write strings to a file opened as "wb"; it expects bytes instead. Since ASCII DXF files are written using strings, the file should be opened as "w". Should be ok for python2 as well. - See also issue 003862, https://tracker.freecadweb.org/view.php?id=3862
This commit is contained in:
committed by
Yorik van Havre
parent
ba4fce2b9e
commit
279453662f
@@ -3932,7 +3932,7 @@ def exportPage(page, filename):
|
||||
c = dxfcounter()
|
||||
pat = re.compile("(_handle_)")
|
||||
template = pat.sub(c.incr, template)
|
||||
f = pythonopen(filename, "wb")
|
||||
f = pythonopen(filename, "w")
|
||||
f.write(template)
|
||||
f.close()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user