Python2 compat for Inkscape

This commit is contained in:
Florian Festi 2017-05-14 21:47:49 +02:00
parent 130f719ba9
commit abb7706b6d
1 changed files with 5 additions and 1 deletions

View File

@ -523,7 +523,11 @@ class Boxes:
self.formats.convert(self.output, self.format)
if self.inkscapefile:
svgutil.svgMerge(self.output, self.inkscapefile, sys.stdout.buffer)
try:
out = sys.stdout.buffer
except AttributeError:
out= sys.stdout
svgutil.svgMerge(self.output, self.inkscapefile, out)
############################################################
### Turtle graphics commands