Shows imports information.
514942
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."
593653
def source_statement(self):
        """"""
        if self._has_alias():
            return 'import %s as %s' % (self.fullName, self.name)
        else:
            return 'import %s' % self.fullName
952928
public void addImportedPackages(String[] imports) {
        if (imports == null) { return; }

        for (String imported : imports) {
            this.mImports.add(imported);
        }
    }
609510
protected void parseImports() {
    List<Element> imports = rootElement.elements("import");
    for (Element theImport : imports) {
      String importType = theImport.attribute("importType");
      XMLImporter importer = this.getImporter(importType, theImport);
      if (importer == null) {
        addError("Could not import item of type " + importType, theImport);
      } else {
        importer.importFrom(theImport, this);
      }
    }
  }
1105257
def parse_imports(self, src):
        "  "
        result = []

        def child(obj):
            result.append(obj.group(1))
        src = self.import_re.sub(child, src)
        return src, result
184292
private static void setImportInfo(Catalog catalog, ImportType importType) {
        if (importType == null) {
            return;
        }
        List<String> streamList = new ArrayList<>();
        List<ImportConfigurationType> kafkaConfigs = new ArrayList<>();

        for (ImportConfigurationType importConfiguration : importType.getConfiguration()) {

            boolean connectorEnabled = importConfiguration.isEnabled();
            if (!connectorEnabled) {
                continue;
            }

            if (importConfiguration.getType().equals(ServerImportEnum.KAFKA)) {
                kafkaConfigs.add(importConfiguration);
            }

            if (!streamList.contains(importConfiguration.getModule())) {
                streamList.add(importConfiguration.getModule());
            }

            buildImportProcessorConfiguration(importConfiguration, true);
        }
        validateKafkaConfig(kafkaConfigs);
    }
130486
def get_imports(filename):
    
    with open(filename, "rb") as f:
        src = f.read()
    finder = ImportFinder()
    finder.visit(ast.parse(src, filename=filename))
    imports = []
    for i in finder.imports:
        name, _, is_from, is_star = i
        imports.append(i + (resolve_import(name, is_from, is_star),))
    return imports
815443
def info():
    """"""
    rc = texinfo()
    print('Running Texinfo files through makeinfo...')
    builddir = os.path.join(BUILDDIR, 'texinfo')
    subprocess.call(['make', '-C', builddir, 'info'])
    print('makeinfo finished; the Info files are in {}.'.format(builddir))
99460
def extract_imports(script):
    """"""
    if not os.path.isfile(script):
        raise ValueError('Not a file: %s' % script)
    parse_tree = parse_python(script)
    result = find_imports(parse_tree)
    result.path = script
    return result
350558
private function importLine()
    {
        $import = false;
        $from = false;
        while (!$this->eol()) {
            $c = $this->peek();
            $tok = null;
            $m = null;

            if ($c === '\\') {
                $m = $this->get(2);
            } elseif ($this->scan('/[,\\.;\\*]+/')) {
                $tok = 'OPERATOR';
            } elseif ($this->scan("/[ \t]+/")) {
            } elseif (($m = $this->scan('/import\\b|from\\b/'))) {
                if ($m === 'import') {
                    $import = true;
                } elseif ($m === 'from') {
                    $from = true;
                } else {
                    assert(0);
                }
                $tok = 'IDENT';
            } elseif ($this->scan('/[_a-zA-Z]\w*/')) {
                assert($from || $import);
                if ($import) {
                    // from module import *item*, or just import *item*
                    $tok = 'USER_FUNCTION';
                    $this->userDefs[$this->match()] = 'TYPE';
                } else {
                    // from *module* ...[import item], the module is not imported
                    $tok = 'IDENT';
                }
            } else {
                break;
            }
            $this->record(($m !== null) ? $m : $this->match(), $tok);
        }
    }
30366
private void fetchImportedKeys() {

        Vector imKeys      = new Vector(20);
        Vector imKeyNames  = null;
        Vector refTabs     = new Vector(20);
        Vector refCols     = new Vector(20);
        Vector refColNames = null;

        try {
            if (cConn == null) {
                return;
            }

            if (dbmeta == null) {
                dbmeta = cConn.getMetaData();
            }

            ResultSet colList = dbmeta.getImportedKeys(null, null, tableName);
            String    pkTable, pkColumn, fkColumn;
            int       keySeq;

            while (colList.next()) {
                pkTable  = colList.getString("PKTABLE_NAME");
                pkColumn = colList.getString("PKCOLUMN_NAME");
                fkColumn = colList.getString("FKCOLUMN_NAME");
                keySeq   = colList.getInt("KEY_SEQ");

                if (keySeq == 1) {
                    if (imKeyNames != null) {
                        imKeys.addElement(imKeyNames);
                        refCols.addElement(refColNames);
                    }    // end of if (exKeyNames != null)

                    imKeyNames  = new Vector(20);
                    refColNames = new Vector(20);

                    refTabs.addElement(pkTable);
                }        // end of if (keySeq == 1)

                imKeyNames.addElement(fkColumn);
                refColNames.addElement(pkColumn);
            }

            if (imKeyNames != null) {
                imKeys.addElement(imKeyNames);
                refCols.addElement(refColNames);
            }            // end of if (exKeyNames != null)

            colList.close();
        } catch (SQLException e) {
            ZaurusEditor.printStatus("SQL Exception: " + e.getMessage());
        }

        // System.out.println("Imported Keys of "+tableName);
        int numberOfConstraints = imKeys.size();

        importedKeys = new String[numberOfConstraints][];
        imColIndex   = new int[numberOfConstraints][];
        refTables    = new String[numberOfConstraints];
        refColumns   = new String[numberOfConstraints][];
        refColIndex  = new int[numberOfConstraints][];

        for (int i = 0; i < numberOfConstraints; i++) {
            Vector keys         = (Vector) imKeys.elementAt(i);
            Vector cols         = (Vector) refCols.elementAt(i);
            int    numberOfKeys = keys.size();

            importedKeys[i] = new String[numberOfKeys];
            imColIndex[i]   = new int[numberOfKeys];
            refColumns[i]   = new String[numberOfKeys];
            refColIndex[i]  = new int[numberOfKeys];
            refTables[i]    = (String) refTabs.elementAt(i);

            // System.out.println("reference table "+refTables[i]);
            for (int j = 0; j < numberOfKeys; j++) {
                importedKeys[i][j] = (String) keys.elementAt(j);
                imColIndex[i][j]   = this.getColIndex(importedKeys[i][j]);
                refColumns[i][j]   = (String) cols.elementAt(j);
                refColIndex[i][j] = this.getColIndex(refColumns[i][j],
                                                     refTables[i]);

                // System.out.println("   importedKeys "+importedKeys[i][j]+"(Index: "+imColIndex[i][j]+") refColumns "+refColumns[i][j]+"(Index: "+refColIndex[i][j]+")");
            }    // end of for (int j=0; j<numberOfKeys; j++)
        }
    }
227964
def printUnusedImports(self):
        """"""
        for module in self.listModules():
            names = [(unused.lineno, unused.name)
                     for unused in module.unused_names]
            names.sort()
            for lineno, name in names:
                if not self.all_unused:
                    line = linecache.getline(module.filename, lineno)
                    if '#' in line:
                        # assume there's a comment explaining why it's not used
                        continue
                print("%s:%s: %s not used" % (module.filename, lineno, name))
1056343
function convertImports(imports) {
		    	for (var file in imports) {
				    if (imports.hasOwnProperty(file)) {
				        postCssInputs[file] = new Input(imports[file], file !== "input" ? { from: file } : undefined);
				    }
				}
			}
1133986
def get_imports(self, option):
        
        if option:
            if len(option) == 1 and option[0].isupper() and len(option[0]) > 3:
                return getattr(settings, option[0])
            else:
                codes = [e for e in option if e.isupper() and len(e) == 3]
                if len(codes) != len(option):
                    raise ImproperlyConfigured("Invalid currency codes found: %s" % codes)
                return codes
        for attr in ('CURRENCIES', 'SHOP_CURRENCIES'):
            try:
                return getattr(settings, attr)
            except AttributeError:
                continue
        return option
287773
def get_imports(self, volume=None, state=None, offset=None, limit=None):
        
        return self._api.imports.query(project=self.id, volume=volume,
                                       state=state, offset=offset, limit=limit)
526140
def display_db_info(self):
        """"""
        with self.open_book() as book:
            default_currency = book.default_currency
            print("Default currency is ", default_currency.mnemonic)
669374
def display_modules_list(self):
        """"""
        print("Plugins list: {}".format(
            ', '.join(sorted(self.stats.getPluginsList(enable=False)))))
        print("Exporters list: {}".format(
            ', '.join(sorted(self.stats.getExportsList(enable=False)))))