code: def showImports(peInstance):
      
      
      iidEntries = peInstance.ntHeaders.optionalHeader.dataDirectory[consts.IMPORT_DIRECTORY].info
      if iidEntries:
          for iidEntry in iidEntries:
              fields = iidEntry.getFields()
              print "module: %s" % iidEntry.metaData.moduleName.value
              for field in fields:
                  print "%s -> %x" % (field,  fields[field].value)
              
              for iatEntry in iidEntry.iat:
                  fields = iatEntry.getFields()
                  for field in fields:
                      print "%s - %r" % (field,  fields[field].value)
                      
              print "\n"
      else:
          print "The file does not have imported functions."
docs: Shows imports information.