From e309a206be4d5c0cd082ef557633d477b1638850 Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Sat, 20 Dec 2014 23:19:33 +0100 Subject: Removed some unused imports in the scripts copied from the Inkscape distribution. --- support/dxf_export/__main__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'support/dxf_export/__main__.py') diff --git a/support/dxf_export/__main__.py b/support/dxf_export/__main__.py index 76c2121..676935e 100644 --- a/support/dxf_export/__main__.py +++ b/support/dxf_export/__main__.py @@ -1,14 +1,14 @@ import sys, os, xml.etree.ElementTree, shutil from lib import util -from . import better_dxf_outlines +from . import effect def _export_dxf(in_path, out_path): - dxf_export = better_dxf_outlines.MyEffect() + dxf_export = effect.DXFExportEffect() dxf_export.affect(args = [in_path], output = False) with open(out_path, 'w') as file: - file.write(dxf_export.dxf) + dxf_export.write(file) def _get_inkscape_layer_count(svg_path): -- cgit From c74efa59dc37b06cc1aeddd0ba736552a5b9f35e Mon Sep 17 00:00:00 2001 From: Michael Schwarz Date: Sat, 20 Dec 2014 22:22:04 +0100 Subject: Rewritten unit conversion methods of inkex.py to properly handle viewport settings. --- support/dxf_export/__main__.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'support/dxf_export/__main__.py') diff --git a/support/dxf_export/__main__.py b/support/dxf_export/__main__.py index 676935e..c770a0e 100644 --- a/support/dxf_export/__main__.py +++ b/support/dxf_export/__main__.py @@ -76,4 +76,10 @@ def main(in_path, out_path): _export_dxf(temp_svg_path, out_path) -main(*sys.argv[1:]) +try: + main(*sys.argv[1:]) +except util.UserError as e: + print 'Error:', e + sys.exit(1) +except KeyboardInterrupt: + sys.exit(2) -- cgit