Vega strike Python Modules doc  0.5.1
Documentation of the " Modules " folder of Vega strike
 All Data Structures Namespaces Files Functions Variables
_FilesystemImporter Class Reference
Inheritance diagram for _FilesystemImporter:
Importer

Public Member Functions

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

Data Fields

 suffixes
 

Detailed Description

Definition at line 527 of file imputil.py.

Constructor & Destructor Documentation

def __init__ (   self)

Definition at line 528 of file imputil.py.

529  def __init__(self):
530  self.suffixes = [ ]

Member Function Documentation

def add_suffix (   self,
  suffix,
  importFunc 
)

Definition at line 531 of file imputil.py.

532  def add_suffix(self, suffix, importFunc):
533  assert callable(importFunc)
534  self.suffixes.append((suffix, importFunc))
def get_code (   self,
  parent,
  modname,
  fqname 
)

Definition at line 541 of file imputil.py.

References _FilesystemImporter._import_pathname(), imputil._os_stat, and _FilesystemImporter.suffixes.

542  def get_code(self, parent, modname, fqname):
543  # This importer is never used with an empty parent. Its existence is
544  # private to the ImportManager. The ImportManager uses the
545  # import_from_dir() method to import top-level modules/packages.
546  # This method is only used when we look for a module within a package.
547  assert parent
548 
549  return self._import_pathname(_os_path_join(parent.__pkgdir__, modname),
550  fqname)
def import_from_dir (   self,
  dir,
  fqname 
)

Definition at line 535 of file imputil.py.

References _FilesystemImporter._import_pathname(), and Importer._process_result().

536  def import_from_dir(self, dir, fqname):
537  result = self._import_pathname(_os_path_join(dir, fqname), fqname)
538  if result:
539  return self._process_result(result, fqname)
540  return None

Field Documentation

suffixes

Definition at line 529 of file imputil.py.


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