Change example_pre to use a list of commands instead of one string

This commit is contained in:
Eric Trombly
2020-03-22 17:59:16 -05:00
parent d68a5c687b
commit 0102ed64b5

View File

@@ -99,7 +99,7 @@ def parse(inputstring):
if lin[0].upper() in ["G", "M"]:
# found a G or M command: we store it
#output += lin + "\n"
output.append(lin) # + "\n"
output.append(Path.Command(str(lin))) # + "\n"
last = lin[0].upper()
for c in lin[1:]:
if not c.isdigit():
@@ -109,7 +109,7 @@ def parse(inputstring):
lastcommand = last
elif lastcommand:
# no G or M command: we repeat the last one
output.append(lastcommand + " " + lin) # + "\n"
output.append(Path.Command(str(lastcommand + " " + lin))) # + "\n"
print("done preprocessing.")
return output