Back to index

enigmail  1.4.3
Public Member Functions | Private Member Functions
expandlibs.ExpandArgs Class Reference
Inheritance diagram for expandlibs.ExpandArgs:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__

Private Member Functions

def _expand
def _expand_desc

Detailed Description

Definition at line 118 of file expandlibs.py.


Constructor & Destructor Documentation

def expandlibs.ExpandArgs.__init__ (   self,
  args 
)
Creates a clone of the |args| list and performs file expansion on
each item it contains

Definition at line 119 of file expandlibs.py.

00119 
00120     def __init__(self, args):
00121         '''Creates a clone of the |args| list and performs file expansion on
00122         each item it contains'''
00123         super(ExpandArgs, self).__init__()
00124         for arg in args:
00125             self += self._expand(arg)

Here is the call graph for this function:


Member Function Documentation

def expandlibs.ExpandArgs._expand (   self,
  arg 
) [private]
Internal function doing the actual work

Definition at line 126 of file expandlibs.py.

00126 
00127     def _expand(self, arg):
00128         '''Internal function doing the actual work'''
00129         (root, ext) = os.path.splitext(arg)
00130         if ext != conf.LIB_SUFFIX or not os.path.basename(root).startswith(conf.LIB_PREFIX):
00131             return [relativize(arg)]
00132         if len(conf.IMPORT_LIB_SUFFIX):
00133             dll = root + conf.IMPORT_LIB_SUFFIX
00134         else:
00135             dll = root.replace(conf.LIB_PREFIX, conf.DLL_PREFIX, 1) + conf.DLL_SUFFIX
00136         if os.path.exists(dll):
00137             return [relativize(dll)]
00138         if os.path.exists(arg):
00139             return [relativize(arg)]
00140         return self._expand_desc(arg)

Here is the call graph for this function:

Here is the caller graph for this function:

def expandlibs.ExpandArgs._expand_desc (   self,
  arg 
) [private]
Internal function taking care of lib descriptor expansion only

Definition at line 141 of file expandlibs.py.

00141 
00142     def _expand_desc(self, arg):
00143         '''Internal function taking care of lib descriptor expansion only'''
00144         if os.path.exists(arg + conf.LIBS_DESC_SUFFIX):
00145             with open(arg + conf.LIBS_DESC_SUFFIX, 'r') as f:
00146                 desc = LibDescriptor(f.readlines())
00147             objs = [relativize(o) for o in desc['OBJS']]
00148             for lib in desc['LIBS']:
00149                 objs += self._expand(lib)
00150             return objs
00151         return [arg]

Here is the call graph for this function:

Here is the caller graph for this function:


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