Refactored use of iteritems into function to deal with python 2.7 and 3 compatibility.

This commit is contained in:
Markus Lampert
2017-10-22 18:18:10 -07:00
parent bba9499f48
commit d52fc9ef84
6 changed files with 15 additions and 7 deletions

View File

@@ -48,6 +48,7 @@ Many other OpenSBP commands not handled
'''
from __future__ import print_function
import FreeCAD
import PathScripts.PathUtil as PathUtil
import os, Path
AXIS = 'X','Y','Z','A','B' #OpenSBP always puts multiaxis move parameters in this order
@@ -145,7 +146,7 @@ def parse(inputstring):
last[words[0][1]] = words[1]
output += s
for key, val in last.iteritems():
for key, val in PathUtil.keyValueIter(last):
if val is not None:
output += key + str(val) + " F" + speed + "\n"