summaryrefslogtreecommitdiff
path: root/lib/extensions
diff options
context:
space:
mode:
authorLex Neva <github.com@lexneva.name>2018-08-02 22:05:42 -0400
committerLex Neva <github.com@lexneva.name>2018-08-02 22:05:42 -0400
commit8f6652dbef562a5b0f865085941d5a5095d8babc (patch)
tree1d2314307e4afef1da6187c5b7c3bbe7e85ddc7d /lib/extensions
parent1ab23cd8742b023ddaa832cb84d73f48b5950a14 (diff)
set stdout to binary mode on windows
Diffstat (limited to 'lib/extensions')
-rw-r--r--lib/extensions/output.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/extensions/output.py b/lib/extensions/output.py
index 1dc8d19d..e72eac7b 100644
--- a/lib/extensions/output.py
+++ b/lib/extensions/output.py
@@ -36,6 +36,10 @@ class Output(InkstitchExtension):
write_embroidery_file(temp_file.name, stitch_plan, self.document.getroot())
+ if sys.platform == "win32":
+ 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: