def getGcodeFileText(fileName, gcodeText):
 if (gcodeText != ''):
  return gcodeText
 if fileName.endswith('.gcode'):
  return archive.getFileText(fileName)
 return ''

def getGcodeFileText ( fileName , gcodeText ) : if ( gcodeText != '' ) : return gcodeText if fileName . endswith ( '.gcode' ) : return archive . getFileText ( fileName ) return ''
get the gcode text from a file if it the gcode text is empty and if the file is a gcode file .