Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions
modulefinder.ModuleFinder Class Reference

List of all members.

Public Member Functions

def __init__
def msg
def msgin
def msgout
def run_script
def load_file
def import_hook
def determine_parent
def find_head_package
def load_tail
def ensure_fromlist
def find_all_submodules
def import_module
def load_module
def scan_opcodes
def scan_opcodes_25
def scan_code
def load_package
def add_module
def find_module
def report
def any_missing
def any_missing_maybe
def replace_paths_in_code

Public Attributes

 path
 modules
 badmodules
 debug
 indent
 excludes
 replace_paths
 processed_paths

Private Member Functions

def _add_badmodule
def _safe_import_hook

Detailed Description

Definition at line 72 of file modulefinder.py.


Constructor & Destructor Documentation

def modulefinder.ModuleFinder.__init__ (   self,
  path = None,
  debug = 0,
  excludes = [],
  replace_paths = [] 
)

Definition at line 74 of file modulefinder.py.

00074 
00075     def __init__(self, path=None, debug=0, excludes=[], replace_paths=[]):
00076         if path is None:
00077             path = sys.path
00078         self.path = path
00079         self.modules = {}
00080         self.badmodules = {}
00081         self.debug = debug
00082         self.indent = 0
00083         self.excludes = excludes
00084         self.replace_paths = replace_paths
00085         self.processed_paths = []   # Used in debugging only

Here is the caller graph for this function:


Member Function Documentation

def modulefinder.ModuleFinder._add_badmodule (   self,
  name,
  caller 
) [private]

Definition at line 306 of file modulefinder.py.

00306 
00307     def _add_badmodule(self, name, caller):
00308         if name not in self.badmodules:
00309             self.badmodules[name] = {}
00310         if caller:
00311             self.badmodules[name][caller.__name__] = 1
00312         else:
00313             self.badmodules[name]["-"] = 1

Here is the caller graph for this function:

def modulefinder.ModuleFinder._safe_import_hook (   self,
  name,
  caller,
  fromlist,
  level = -1 
) [private]

Definition at line 314 of file modulefinder.py.

00314 
00315     def _safe_import_hook(self, name, caller, fromlist, level=-1):
00316         # wrapper for self.import_hook() that won't raise ImportError
00317         if name in self.badmodules:
00318             self._add_badmodule(name, caller)
00319             return
00320         try:
00321             self.import_hook(name, caller, level=level)
00322         except ImportError as msg:
00323             self.msg(2, "ImportError:", str(msg))
00324             self._add_badmodule(name, caller)
00325         else:
00326             if fromlist:
00327                 for sub in fromlist:
00328                     if sub in self.badmodules:
00329                         self._add_badmodule(sub, caller)
00330                         continue
00331                     try:
00332                         self.import_hook(name, caller, [sub], level=level)
00333                     except ImportError as msg:
00334                         self.msg(2, "ImportError:", str(msg))
00335                         fullname = name + "." + sub
00336                         self._add_badmodule(fullname, caller)

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.add_module (   self,
  fqname 
)

Definition at line 463 of file modulefinder.py.

00463 
00464     def add_module(self, fqname):
00465         if fqname in self.modules:
00466             return self.modules[fqname]
00467         self.modules[fqname] = m = Module(fqname)
00468         return m

Here is the caller graph for this function:

Return a list of modules that appear to be missing. Use
any_missing_maybe() if you want to know which modules are
certain to be missing, and which *may* be missing.

Definition at line 520 of file modulefinder.py.

00520 
00521     def any_missing(self):
00522         """Return a list of modules that appear to be missing. Use
00523         any_missing_maybe() if you want to know which modules are
00524         certain to be missing, and which *may* be missing.
00525         """
00526         missing, maybe = self.any_missing_maybe()
00527         return missing + maybe

Here is the call graph for this function:

Return two lists, one with modules that are certainly missing
and one with modules that *may* be missing. The latter names could
either be submodules *or* just global names in the package.

The reason it can't always be determined is that it's impossible to
tell which names are imported when "from module import *" is done
with an extension module, short of actually importing it.

Definition at line 528 of file modulefinder.py.

00528 
00529     def any_missing_maybe(self):
00530         """Return two lists, one with modules that are certainly missing
00531         and one with modules that *may* be missing. The latter names could
00532         either be submodules *or* just global names in the package.
00533 
00534         The reason it can't always be determined is that it's impossible to
00535         tell which names are imported when "from module import *" is done
00536         with an extension module, short of actually importing it.
00537         """
00538         missing = []
00539         maybe = []
00540         for name in self.badmodules:
00541             if name in self.excludes:
00542                 continue
00543             i = name.rfind(".")
00544             if i < 0:
00545                 missing.append(name)
00546                 continue
00547             subname = name[i+1:]
00548             pkgname = name[:i]
00549             pkg = self.modules.get(pkgname)
00550             if pkg is not None:
00551                 if pkgname in self.badmodules[name]:
00552                     # The package tried to import this module itself and
00553                     # failed. It's definitely missing.
00554                     missing.append(name)
00555                 elif subname in pkg.globalnames:
00556                     # It's a global in the package: definitely not missing.
00557                     pass
00558                 elif pkg.starimports:
00559                     # It could be missing, but the package did an "import *"
00560                     # from a non-Python module, so we simply can't be sure.
00561                     maybe.append(name)
00562                 else:
00563                     # It's not a global in the package, the package didn't
00564                     # do funny star imports, it's very likely to be missing.
00565                     # The symbol could be inserted into the package from the
00566                     # outside, but since that's not good style we simply list
00567                     # it missing.
00568                     missing.append(name)
00569             else:
00570                 missing.append(name)
00571         missing.sort()
00572         maybe.sort()
00573         return missing, maybe

Here is the caller graph for this function:

def modulefinder.ModuleFinder.determine_parent (   self,
  caller,
  level = -1 
)

Definition at line 131 of file modulefinder.py.

00131 
00132     def determine_parent(self, caller, level=-1):
00133         self.msgin(4, "determine_parent", caller, level)
00134         if not caller or level == 0:
00135             self.msgout(4, "determine_parent -> None")
00136             return None
00137         pname = caller.__name__
00138         if level >= 1: # relative import
00139             if caller.__path__:
00140                 level -= 1
00141             if level == 0:
00142                 parent = self.modules[pname]
00143                 assert parent is caller
00144                 self.msgout(4, "determine_parent ->", parent)
00145                 return parent
00146             if pname.count(".") < level:
00147                 raise ImportError("relative importpath too deep")
00148             pname = ".".join(pname.split(".")[:-level])
00149             parent = self.modules[pname]
00150             self.msgout(4, "determine_parent ->", parent)
00151             return parent
00152         if caller.__path__:
00153             parent = self.modules[pname]
00154             assert caller is parent
00155             self.msgout(4, "determine_parent ->", parent)
00156             return parent
00157         if '.' in pname:
00158             i = pname.rfind('.')
00159             pname = pname[:i]
00160             parent = self.modules[pname]
00161             assert parent.__name__ == pname
00162             self.msgout(4, "determine_parent ->", parent)
00163             return parent
00164         self.msgout(4, "determine_parent -> None")
00165         return None

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.ensure_fromlist (   self,
  m,
  fromlist,
  recursive = 0 
)

Definition at line 208 of file modulefinder.py.

00208 
00209     def ensure_fromlist(self, m, fromlist, recursive=0):
00210         self.msg(4, "ensure_fromlist", m, fromlist, recursive)
00211         for sub in fromlist:
00212             if sub == "*":
00213                 if not recursive:
00214                     all = self.find_all_submodules(m)
00215                     if all:
00216                         self.ensure_fromlist(m, all, 1)
00217             elif not hasattr(m, sub):
00218                 subname = "%s.%s" % (m.__name__, sub)
00219                 submod = self.import_module(sub, subname, m)
00220                 if not submod:
00221                     raise ImportError("No module named " + subname)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 222 of file modulefinder.py.

00222 
00223     def find_all_submodules(self, m):
00224         if not m.__path__:
00225             return
00226         modules = {}
00227         # 'suffixes' used to be a list hardcoded to [".py", ".pyc", ".pyo"].
00228         # But we must also collect Python extension modules - although
00229         # we cannot separate normal dlls from Python extensions.
00230         suffixes = []
00231         for triple in imp.get_suffixes():
00232             suffixes.append(triple[0])
00233         for dir in m.__path__:
00234             try:
00235                 names = os.listdir(dir)
00236             except os.error:
00237                 self.msg(2, "can't list directory", dir)
00238                 continue
00239             for name in names:
00240                 mod = None
00241                 for suff in suffixes:
00242                     n = len(suff)
00243                     if name[-n:] == suff:
00244                         mod = name[:-n]
00245                         break
00246                 if mod and mod != "__init__":
00247                     modules[mod] = mod
00248         return modules.keys()

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.find_head_package (   self,
  parent,
  name 
)

Definition at line 166 of file modulefinder.py.

00166 
00167     def find_head_package(self, parent, name):
00168         self.msgin(4, "find_head_package", parent, name)
00169         if '.' in name:
00170             i = name.find('.')
00171             head = name[:i]
00172             tail = name[i+1:]
00173         else:
00174             head = name
00175             tail = ""
00176         if parent:
00177             qname = "%s.%s" % (parent.__name__, head)
00178         else:
00179             qname = head
00180         q = self.import_module(head, qname, parent)
00181         if q:
00182             self.msgout(4, "find_head_package ->", (q, tail))
00183             return q, tail
00184         if parent:
00185             qname = head
00186             parent = None
00187             q = self.import_module(head, qname, parent)
00188             if q:
00189                 self.msgout(4, "find_head_package ->", (q, tail))
00190                 return q, tail
00191         self.msgout(4, "raise ImportError: No module named", qname)
00192         raise ImportError("No module named " + qname)

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.find_module (   self,
  name,
  path,
  parent = None 
)

Definition at line 469 of file modulefinder.py.

00469 
00470     def find_module(self, name, path, parent=None):
00471         if parent is not None:
00472             # assert path is not None
00473             fullname = parent.__name__+'.'+name
00474         else:
00475             fullname = name
00476         if fullname in self.excludes:
00477             self.msgout(3, "find_module -> Excluded", fullname)
00478             raise ImportError(name)
00479 
00480         if path is None:
00481             if name in sys.builtin_module_names:
00482                 return (None, None, ("", "", imp.C_BUILTIN))
00483 
00484             path = self.path
00485         return imp.find_module(name, path)

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.import_hook (   self,
  name,
  caller = None,
  fromlist = None,
  level = -1 
)

Definition at line 120 of file modulefinder.py.

00120 
00121     def import_hook(self, name, caller=None, fromlist=None, level=-1):
00122         self.msg(3, "import_hook", name, caller, fromlist, level)
00123         parent = self.determine_parent(caller, level=level)
00124         q, tail = self.find_head_package(parent, name)
00125         m = self.load_tail(q, tail)
00126         if not fromlist:
00127             return q
00128         if m.__path__:
00129             self.ensure_fromlist(m, fromlist)
00130         return None

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.import_module (   self,
  partname,
  fqname,
  parent 
)

Definition at line 249 of file modulefinder.py.

00249 
00250     def import_module(self, partname, fqname, parent):
00251         self.msgin(3, "import_module", partname, fqname, parent)
00252         try:
00253             m = self.modules[fqname]
00254         except KeyError:
00255             pass
00256         else:
00257             self.msgout(3, "import_module ->", m)
00258             return m
00259         if fqname in self.badmodules:
00260             self.msgout(3, "import_module -> None")
00261             return None
00262         if parent and parent.__path__ is None:
00263             self.msgout(3, "import_module -> None")
00264             return None
00265         try:
00266             fp, pathname, stuff = self.find_module(partname,
00267                                                    parent and parent.__path__, parent)
00268         except ImportError:
00269             self.msgout(3, "import_module ->", None)
00270             return None
00271         try:
00272             m = self.load_module(fqname, fp, pathname, stuff)
00273         finally:
00274             if fp: fp.close()
00275         if parent:
00276             setattr(parent, partname, m)
00277         self.msgout(3, "import_module ->", m)
00278         return m

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.load_file (   self,
  pathname 
)

Definition at line 113 of file modulefinder.py.

00113 
00114     def load_file(self, pathname):
00115         dir, name = os.path.split(pathname)
00116         name, ext = os.path.splitext(name)
00117         with open(pathname, READ_MODE) as fp:
00118             stuff = (ext, "r", imp.PY_SOURCE)
00119             self.load_module(name, fp, pathname, stuff)

Here is the call graph for this function:

def modulefinder.ModuleFinder.load_module (   self,
  fqname,
  fp,
  pathname,
  file_info 
)

Definition at line 279 of file modulefinder.py.

00279 
00280     def load_module(self, fqname, fp, pathname, file_info):
00281         suffix, mode, type = file_info
00282         self.msgin(2, "load_module", fqname, fp and "fp", pathname)
00283         if type == imp.PKG_DIRECTORY:
00284             m = self.load_package(fqname, pathname)
00285             self.msgout(2, "load_module ->", m)
00286             return m
00287         if type == imp.PY_SOURCE:
00288             co = compile(fp.read()+'\n', pathname, 'exec')
00289         elif type == imp.PY_COMPILED:
00290             if fp.read(4) != imp.get_magic():
00291                 self.msgout(2, "raise ImportError: Bad magic number", pathname)
00292                 raise ImportError("Bad magic number in %s" % pathname)
00293             fp.read(4)
00294             co = marshal.load(fp)
00295         else:
00296             co = None
00297         m = self.add_module(fqname)
00298         m.__file__ = pathname
00299         if co:
00300             if self.replace_paths:
00301                 co = self.replace_paths_in_code(co)
00302             m.__code__ = co
00303             self.scan_code(co, m)
00304         self.msgout(2, "load_module ->", m)
00305         return m

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.load_package (   self,
  fqname,
  pathname 
)

Definition at line 442 of file modulefinder.py.

00442 
00443     def load_package(self, fqname, pathname):
00444         self.msgin(2, "load_package", fqname, pathname)
00445         newname = replacePackageMap.get(fqname)
00446         if newname:
00447             fqname = newname
00448         m = self.add_module(fqname)
00449         m.__file__ = pathname
00450         m.__path__ = [pathname]
00451 
00452         # As per comment at top of file, simulate runtime __path__ additions.
00453         m.__path__ = m.__path__ + packagePathMap.get(fqname, [])
00454 
00455         fp, buf, stuff = self.find_module("__init__", m.__path__)
00456         try:
00457             self.load_module(fqname, fp, buf, stuff)
00458             self.msgout(2, "load_package ->", m)
00459             return m
00460         finally:
00461             if fp:
00462                 fp.close()

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.load_tail (   self,
  q,
  tail 
)

Definition at line 193 of file modulefinder.py.

00193 
00194     def load_tail(self, q, tail):
00195         self.msgin(4, "load_tail", q, tail)
00196         m = q
00197         while tail:
00198             i = tail.find('.')
00199             if i < 0: i = len(tail)
00200             head, tail = tail[:i], tail[i+1:]
00201             mname = "%s.%s" % (m.__name__, head)
00202             m = self.import_module(head, mname, m)
00203             if not m:
00204                 self.msgout(4, "raise ImportError: No module named", mname)
00205                 raise ImportError("No module named " + mname)
00206         self.msgout(4, "load_tail ->", m)
00207         return m

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.msg (   self,
  level,
  str,
  args 
)

Definition at line 86 of file modulefinder.py.

00086 
00087     def msg(self, level, str, *args):
00088         if level <= self.debug:
00089             for i in range(self.indent):
00090                 print("   ", end=' ')
00091             print(str, end=' ')
00092             for arg in args:
00093                 print(repr(arg), end=' ')
00094             print()

Here is the caller graph for this function:

def modulefinder.ModuleFinder.msgin (   self,
  args 
)

Definition at line 95 of file modulefinder.py.

00095 
00096     def msgin(self, *args):
00097         level = args[0]
00098         if level <= self.debug:
00099             self.indent = self.indent + 1
00100             self.msg(*args)

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.msgout (   self,
  args 
)

Definition at line 101 of file modulefinder.py.

00101 
00102     def msgout(self, *args):
00103         level = args[0]
00104         if level <= self.debug:
00105             self.indent = self.indent - 1
00106             self.msg(*args)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 574 of file modulefinder.py.

00574 
00575     def replace_paths_in_code(self, co):
00576         new_filename = original_filename = os.path.normpath(co.co_filename)
00577         for f, r in self.replace_paths:
00578             if original_filename.startswith(f):
00579                 new_filename = r + original_filename[len(f):]
00580                 break
00581 
00582         if self.debug and original_filename not in self.processed_paths:
00583             if new_filename != original_filename:
00584                 self.msgout(2, "co_filename %r changed to %r" \
00585                                     % (original_filename,new_filename,))
00586             else:
00587                 self.msgout(2, "co_filename %r remains unchanged" \
00588                                     % (original_filename,))
00589             self.processed_paths.append(original_filename)
00590 
00591         consts = list(co.co_consts)
00592         for i in range(len(consts)):
00593             if isinstance(consts[i], type(co)):
00594                 consts[i] = self.replace_paths_in_code(consts[i])
00595 
00596         return types.CodeType(co.co_argcount, co.co_nlocals, co.co_stacksize,
00597                          co.co_flags, co.co_code, tuple(consts), co.co_names,
00598                          co.co_varnames, new_filename, co.co_name,
00599                          co.co_firstlineno, co.co_lnotab,
00600                          co.co_freevars, co.co_cellvars)
00601 

Here is the call graph for this function:

Here is the caller graph for this function:

Print a report to stdout, listing the found modules with their
paths, as well as modules that are missing, or seem to be missing.

Definition at line 486 of file modulefinder.py.

00486 
00487     def report(self):
00488         """Print a report to stdout, listing the found modules with their
00489         paths, as well as modules that are missing, or seem to be missing.
00490         """
00491         print()
00492         print("  %-25s %s" % ("Name", "File"))
00493         print("  %-25s %s" % ("----", "----"))
00494         # Print modules found
00495         keys = sorted(self.modules.keys())
00496         for key in keys:
00497             m = self.modules[key]
00498             if m.__path__:
00499                 print("P", end=' ')
00500             else:
00501                 print("m", end=' ')
00502             print("%-25s" % key, m.__file__ or "")
00503 
00504         # Print missing modules
00505         missing, maybe = self.any_missing_maybe()
00506         if missing:
00507             print()
00508             print("Missing modules:")
00509             for name in missing:
00510                 mods = sorted(self.badmodules[name].keys())
00511                 print("?", name, "imported from", ', '.join(mods))
00512         # Print modules that may be missing, but then again, maybe not...
00513         if maybe:
00514             print()
00515             print("Submodules thay appear to be missing, but could also be", end=' ')
00516             print("global names in the parent package:")
00517             for name in maybe:
00518                 mods = sorted(self.badmodules[name].keys())
00519                 print("?", name, "imported from", ', '.join(mods))

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.run_script (   self,
  pathname 
)

Definition at line 107 of file modulefinder.py.

00107 
00108     def run_script(self, pathname):
00109         self.msg(2, "run_script", pathname)
00110         with open(pathname, READ_MODE) as fp:
00111             stuff = ("", "r", imp.PY_SOURCE)
00112             self.load_module('__main__', fp, pathname, stuff)

Here is the call graph for this function:

def modulefinder.ModuleFinder.scan_code (   self,
  co,
  m 
)

Definition at line 390 of file modulefinder.py.

00390 
00391     def scan_code(self, co, m):
00392         code = co.co_code
00393         if sys.version_info >= (2, 5):
00394             scanner = self.scan_opcodes_25
00395         else:
00396             scanner = self.scan_opcodes
00397         for what, args in scanner(co):
00398             if what == "store":
00399                 name, = args
00400                 m.globalnames[name] = 1
00401             elif what == "absolute_import":
00402                 fromlist, name = args
00403                 have_star = 0
00404                 if fromlist is not None:
00405                     if "*" in fromlist:
00406                         have_star = 1
00407                     fromlist = [f for f in fromlist if f != "*"]
00408                 self._safe_import_hook(name, m, fromlist, level=0)
00409                 if have_star:
00410                     # We've encountered an "import *". If it is a Python module,
00411                     # the code has already been parsed and we can suck out the
00412                     # global names.
00413                     mm = None
00414                     if m.__path__:
00415                         # At this point we don't know whether 'name' is a
00416                         # submodule of 'm' or a global module. Let's just try
00417                         # the full name first.
00418                         mm = self.modules.get(m.__name__ + "." + name)
00419                     if mm is None:
00420                         mm = self.modules.get(name)
00421                     if mm is not None:
00422                         m.globalnames.update(mm.globalnames)
00423                         m.starimports.update(mm.starimports)
00424                         if mm.__code__ is None:
00425                             m.starimports[name] = 1
00426                     else:
00427                         m.starimports[name] = 1
00428             elif what == "relative_import":
00429                 level, fromlist, name = args
00430                 if name:
00431                     self._safe_import_hook(name, m, fromlist, level=level)
00432                 else:
00433                     parent = self.determine_parent(m, level=level)
00434                     self._safe_import_hook(parent.__name__, None, fromlist, level=0)
00435             else:
00436                 # We don't expect anything else from the generator.
00437                 raise RuntimeError(what)
00438 
00439         for c in co.co_consts:
00440             if isinstance(c, type(co)):
00441                 self.scan_code(c, m)

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.scan_opcodes (   self,
  co,
  unpack = struct.unpack 
)

Definition at line 338 of file modulefinder.py.

00338 
00339                      unpack = struct.unpack):
00340         # Scan the code, and yield 'interesting' opcode combinations
00341         # Version for Python 2.4 and older
00342         code = co.co_code
00343         names = co.co_names
00344         consts = co.co_consts
00345         while code:
00346             c = code[0]
00347             if c in STORE_OPS:
00348                 oparg, = unpack('<H', code[1:3])
00349                 yield "store", (names[oparg],)
00350                 code = code[3:]
00351                 continue
00352             if c == LOAD_CONST and code[3] == IMPORT_NAME:
00353                 oparg_1, oparg_2 = unpack('<xHxH', code[:6])
00354                 yield "import", (consts[oparg_1], names[oparg_2])
00355                 code = code[6:]
00356                 continue
00357             if c >= HAVE_ARGUMENT:
00358                 code = code[3:]
00359             else:
00360                 code = code[1:]

Here is the call graph for this function:

Here is the caller graph for this function:

def modulefinder.ModuleFinder.scan_opcodes_25 (   self,
  co,
  unpack = struct.unpack 
)

Definition at line 362 of file modulefinder.py.

00362 
00363                      unpack = struct.unpack):
00364         # Scan the code, and yield 'interesting' opcode combinations
00365         # Python 2.5 version (has absolute and relative imports)
00366         code = co.co_code
00367         names = co.co_names
00368         consts = co.co_consts
00369         LOAD_LOAD_AND_IMPORT = LOAD_CONST + LOAD_CONST + IMPORT_NAME
00370         while code:
00371             c = bytes([code[0]])
00372             if c in STORE_OPS:
00373                 oparg, = unpack('<H', code[1:3])
00374                 yield "store", (names[oparg],)
00375                 code = code[3:]
00376                 continue
00377             if code[:9:3] == LOAD_LOAD_AND_IMPORT:
00378                 oparg_1, oparg_2, oparg_3 = unpack('<xHxHxH', code[:9])
00379                 level = consts[oparg_1]
00380                 if level == 0: # absolute import
00381                     yield "absolute_import", (consts[oparg_2], names[oparg_3])
00382                 else: # relative import
00383                     yield "relative_import", (level, consts[oparg_2], names[oparg_3])
00384                 code = code[9:]
00385                 continue
00386             if c >= HAVE_ARGUMENT:
00387                 code = code[3:]
00388             else:
00389                 code = code[1:]

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 79 of file modulefinder.py.

Definition at line 80 of file modulefinder.py.

Definition at line 82 of file modulefinder.py.

Definition at line 81 of file modulefinder.py.

Definition at line 78 of file modulefinder.py.

Definition at line 77 of file modulefinder.py.

Definition at line 84 of file modulefinder.py.

Definition at line 83 of file modulefinder.py.


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