feed(x,y,z)or (since python supports named arguments)
rapid(a=90, b=360)or (home is a tuple)
safe_rapid(home)
print "G0 X1 Y%f Z%f" (y, z)or
print "G0 X1 Y", y, "Z", zor
print """ <50 lines of unmodified gcode> """
the "print" function could even be renamed to "gcode" for clarity and to free up the print function for displaying messages to the machine operator
lerman suggested modifying the python interpreter to read any line starting with a colon and to substitute python variable after a # mark, a la
:g1 f10 x#endX y#endY
using a gcode subset is better than using canon, because for instance using canon means you have to account for tool length, coordinate system offsets, and (worst!) cutter radius compensation yourself
rs274.author.Gcode's constructor takes an argument called 'target', which is a function to be called with each line of gcode produced. it's tempting to think that you could have this simply issue each command as an mdi over nml
$ pydoc emc | abort(...) | | auto(...) | | brake(...) | | debug(...) | | feedrate(...) | | flood(...) | | home(...) | | jog(...) | | load_tool_table(...) | | mdi(...) | | mist(...) | | mode(...) | | override_limits(...) | | program_open(...)
etc.