summaryrefslogtreecommitdiff
path: root/lib/extensions/output.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-07-25 21:21:24 -0400
committerGitHub <noreply@github.com>2018-07-25 21:21:24 -0400
commitf1478556565f2e23150c86b17e6e170edc217d23 (patch)
tree4e652bde1122f44f360e140b696cb0eb81a7e9e1 /lib/extensions/output.py
parent82c06cceda54d559e78792e5284f3520908142ed (diff)
parent1bd7aa110a1b30a6c44f4d792b3c817e10234c07 (diff)
Merge pull request #234 from inkstitch/lexelby-integrate-pyembroidery
switch from libembroidery to pyembroidery
Diffstat (limited to 'lib/extensions/output.py')
-rw-r--r--lib/extensions/output.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/extensions/output.py b/lib/extensions/output.py
index f4b153e6..1dc8d19d 100644
--- a/lib/extensions/output.py
+++ b/lib/extensions/output.py
@@ -29,20 +29,17 @@ class Output(InkstitchExtension):
patches = self.elements_to_patches(self.elements)
stitch_plan = patches_to_stitch_plan(patches, self.options.collapse_length_mm * PIXELS_PER_MM)
- # libembroidery wants to write to an actual file rather than stdout
temp_file = tempfile.NamedTemporaryFile(suffix=".%s" % self.options.file_extension, delete=False)
# in windows, failure to close here will keep the file locked
temp_file.close()
- # libembroidery likes to debug log things to stdout. No way to disable it.
- save_stdout()
write_embroidery_file(temp_file.name, stitch_plan, self.document.getroot())
# 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:
- sys.real_stdout.write(output_file.read())
+ sys.stdout.write(output_file.read())
# clean up the temp file
os.remove(temp_file.name)