summaryrefslogtreecommitdiffstats
path: root/share/extensions/plotter.py
diff options
context:
space:
mode:
Diffstat (limited to 'share/extensions/plotter.py')
-rwxr-xr-xshare/extensions/plotter.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/share/extensions/plotter.py b/share/extensions/plotter.py
index 8a14d55bc..1d8e8f79e 100755
--- a/share/extensions/plotter.py
+++ b/share/extensions/plotter.py
@@ -104,7 +104,7 @@ class Plot(inkex.Effect):
hpglInit += ';FS%d' % self.options.force
if self.options.speed > 0:
hpglInit += ';VS%d' % self.options.speed
- self.hpgl = hpglInit + self.hpgl + ';SP0;PU0,0;IN; '
+ self.hpgl = hpglInit + self.hpgl + ';PU0,0;SP0;IN; '
def convertToDmpl(self):
# convert HPGL to DMPL
@@ -127,7 +127,7 @@ class Plot(inkex.Effect):
if self.options.speed > 0:
dmplInit += 'V%d' % self.options.speed
dmplInit += 'EC1'
- self.hpgl = dmplInit + self.hpgl[1:] + ',P0,U0,0,Z '
+ self.hpgl = dmplInit + self.hpgl[1:] + ',U0,0,P0,Z '
def convertToKNK(self):
# convert HPGL to KNK Plotter Language
@@ -136,7 +136,7 @@ class Plot(inkex.Effect):
hpglInit += ';FS%d' % self.options.force
if self.options.speed > 0:
hpglInit += ';VS%d' % self.options.speed
- self.hpgl = hpglInit + self.hpgl + ';SP0;PU0,0;@ '
+ self.hpgl = hpglInit + self.hpgl + ';PU0,0;SP0;@ '
def sendHpglToSerial(self):
# gracefully exit script when pySerial is missing
@@ -196,7 +196,7 @@ class Plot(inkex.Effect):
try:
mySerial.open()
except Exception as inst:
- if 'ould not open port' in inst.args[0]:
+ if inst.strerror is not None and 'ould not open port' in inst.strerror:
inkex.errormsg(_("Could not open port. Please check that your plotter is running, connected and the settings are correct."))
return
else: