Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
BuiltinImporter Class Reference

Emulate the import mechanism for builtin and frozen modules. More...

Inheritance diagram for BuiltinImporter:
Importer

Public Member Functions

def get_code
 
- Public Member Functions inherited from Importer
def import_top
 
def get_code
 METHODS TO OVERRIDE. More...
 

Detailed Description

Emulate the import mechanism for builtin and frozen modules.

Definition at line 503 of file imputil.py.

Member Function Documentation

def get_code (   self,
  parent,
  modname,
  fqname 
)

Definition at line 504 of file imputil.py.

505  def get_code(self, parent, modname, fqname):
506  if parent:
507  # these modules definitely do not occur within a package context
508  return None
509 
510  # look for the module
511  if imp.is_builtin(modname):
512  type = imp.C_BUILTIN
513  elif imp.is_frozen(modname):
514  type = imp.PY_FROZEN
515  else:
516  # not found
517  return None
518 
519  # got it. now load and return it.
520  module = imp.load_module(modname, None, modname, ('', '', type))
521  return 0, module, { }
522 

The documentation for this class was generated from the following file: