code: def showDosHeaderData(peInstance):
      
      
      dosFields = peInstance.dosHeader.getFields()
      print "[+] IMAGE_DOS_HEADER values:\n"
      for field in dosFields:
          if isinstance(dosFields[field],  datatypes.Array):
              print "--> %s - Array of length %d" % (field,  len(dosFields[field]))
              counter = 0
              for element in dosFields[field]:
                  print "[%d] 0x%08x" % (counter,  element.value)
                  counter += 1
          else:
              print "--> %s = 0x%08x" % (field,  dosFields[field].value)
docs: Prints IMAGE_DOS_HEADER fields.