summaryrefslogtreecommitdiff
path: root/lib/extensions/input.py
diff options
context:
space:
mode:
authorLex Neva <lexelby@users.noreply.github.com>2018-06-17 21:32:24 -0400
committerGitHub <noreply@github.com>2018-06-17 21:32:24 -0400
commitd3866deb4a686f96265a76f670db1386e9b459ba (patch)
tree8a409901a19acc8f14252f430807c7964e62aadc /lib/extensions/input.py
parent564f15cd55954afde358eed24809632e6ea9c2d7 (diff)
parent0659bc294e943bcaa10f63966e667003623e6da4 (diff)
Merge pull request #198 from lexelby/lexelby-output-extension
output extensions
Diffstat (limited to 'lib/extensions/input.py')
-rw-r--r--lib/extensions/input.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/extensions/input.py b/lib/extensions/input.py
index 251859c5..21248dd9 100644
--- a/lib/extensions/input.py
+++ b/lib/extensions/input.py
@@ -14,6 +14,7 @@ from ..svg import PIXELS_PER_MM, render_stitch_plan
from ..svg.tags import INKSCAPE_LABEL
from ..i18n import _
from ..stitch_plan import StitchPlan
+from ..utils.io import save_stdout
class Input(object):
@@ -25,6 +26,9 @@ class Input(object):
def affect(self, args):
+ # libembroidery likes to dump a bunch of debugging stuff to stdout
+ save_stdout()
+
embroidery_file = args[0]
pattern = embPattern_create()
embPattern_read(pattern, embroidery_file)
@@ -65,4 +69,4 @@ class Input(object):
# Note: this is NOT the same as centering the design in the canvas!
layer.set('transform', 'translate(%s,%s)' % (extents[0], extents[1]))
- print etree.tostring(svg)
+ print >> sys.real_stdout, etree.tostring(svg)