def getGcodeTextWithoutRedundantMcode(gcodeText):
 lines = archive.getTextLines(gcodeText)
 lines = getLinesWithoutRedundancy('M104', lines)
 lines = getLinesWithoutRedundancy('M108', lines)
 output = cStringIO.StringIO()
 gcodec.addLinesToCString(output, lines)
 return output.getvalue()

def getGcodeTextWithoutRedundantMcode ( gcodeText ) : lines = archive . getTextLines ( gcodeText ) lines = getLinesWithoutRedundancy ( 'M104' , lines ) lines = getLinesWithoutRedundancy ( 'M108' , lines ) output = cStringIO . StringIO ( ) gcodec . addLinesToCString ( output , lines ) return output . getvalue ( )
get gcode text without redundant m104 and m108 .