set stdout to binary mode on windows

pull/259/head
Lex Neva 2018-08-02 22:05:42 -04:00
rodzic 1ab23cd874
commit 8f6652dbef
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -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: