summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-03 22:11:13 -0400
committerLex Neva <github.com@lexneva.name>2018-08-03 22:11:13 -0400
commit782b5efc71ab63a6becd7aa846feed5ea48a678a (patch)
treef6991a212d1bb42975912688c11317b740eb96c6 /lib/extensions
parentb7c5a594ddded90c6ff9233825ac280aa7eb0367 (diff)
read in binary too
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/output.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/extensions/output.py b/lib/extensions/output.py
index bae0998c..f3bb0a80 100644
--- a/lib/extensions/output.py
+++ b/lib/extensions/output.py
@@ -37,13 +37,12 @@ class Output(InkstitchExtension):
write_embroidery_file(temp_file.name, stitch_plan, self.document.getroot())
if sys.platform == "win32":
- print >> sys.stderr, "setting stdout to binary mode"
import msvcrt
msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
# inkscape will read the file contents from stdout and copy
# to the destination file that the user chose
- with open(temp_file.name) as output_file:
+ with open(temp_file.name, "rb") as output_file:
sys.stdout.write(output_file.read())
sys.stdout.flush()