diff options
| author | Maren Hachmann <maren@goos-habermann.de> | 2018-02-07 22:17:10 +0000 |
|---|---|---|
| committer | Eduard Braun <eduard.braun2@gmx.de> | 2018-02-10 14:04:37 +0000 |
| commit | b69c831773b99b08252411f1a6ab5cf4a482c0cc (patch) | |
| tree | 2378dde78308c3c13042c7877b04401009e74fdc /share/extensions | |
| parent | Update gcodetools.py to work with Inkscape > 0.91, fix written by inkscapecom... (diff) | |
| download | inkscape-b69c831773b99b08252411f1a6ab5cf4a482c0cc.tar.gz inkscape-b69c831773b99b08252411f1a6ab5cf4a482c0cc.zip | |
Copy numpy import error message over from measure.py (no new strings)
Diffstat (limited to 'share/extensions')
| -rwxr-xr-x | share/extensions/gcodetools.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/extensions/gcodetools.py b/share/extensions/gcodetools.py index 1f0001c3a..be471136e 100755 --- a/share/extensions/gcodetools.py +++ b/share/extensions/gcodetools.py @@ -78,7 +78,6 @@ import copy import sys import time import cmath -import numpy import codecs import random # local library @@ -93,6 +92,12 @@ import bezmisc if "errormsg" not in dir(inkex): inkex.errormsg = lambda msg: sys.stderr.write((unicode(msg) + "\n").encode("UTF-8")) +try: + import numpy +except: + inkex.errormsg(_("Failed to import the numpy modules. These modules are required by this extension. Please install them and try again. On a Debian-like system this can be done with the command, sudo apt-get install python-numpy.")) + exit() + def bezierslopeatt(((bx0,by0),(bx1,by1),(bx2,by2),(bx3,by3)),t): ax,ay,bx,by,cx,cy,x0,y0=bezmisc.bezierparameterize(((bx0,by0),(bx1,by1),(bx2,by2),(bx3,by3))) |
