Exemple #1
0
 def __init__(self, work_path, ident=None, inherited=None, force=False, **kargs):
     M.__init__(self, **kargs)
     self._workspace_desc_ = M()
     self._workspace_desc_['path'] = work_path
     self._workspace_desc_['ident'] = ident
     self._workspace_desc_['inherited'] = inherited
     if os.path.exists(work_path):
         dlist = Dir.showall(work_path)
         for dname in dlist:
             ns_path = work_path + '/' + dname
             if Dir.isDir(ns_path):
                 ns = NameSpace(ns_path, ident, inherited, force, **kargs)
                 if len(ns) > 0: self[ns._namespace_desc_.name] = ns
Exemple #2
0
 def __init__(self,
              work_path,
              ident=None,
              inherited=None,
              force=False,
              **kargs):
     M.__init__(self, **kargs)
     self._workspace_desc_ = M()
     self._workspace_desc_['path'] = work_path
     self._workspace_desc_['ident'] = ident
     self._workspace_desc_['inherited'] = inherited
     if os.path.exists(work_path):
         dlist = Dir.showall(work_path)
         for dname in dlist:
             ns_path = work_path + '/' + dname
             if Dir.isDir(ns_path):
                 ns = NameSpace(ns_path, ident, inherited, force, **kargs)
                 if len(ns) > 0: self[ns._namespace_desc_.name] = ns
Exemple #3
0
 def __init__(self, ns_path, ident=None, inherited=None, force=False, **kargs):
     M.__init__(self, **kargs)
     self._namespace_desc_ = M()
     self._namespace_desc_['name'] = os.path.split(ns_path)[-1]
     self._namespace_desc_['path'] = ns_path
     self._namespace_desc_['ident'] = ident
     self._namespace_desc_['inherited'] = inherited
     if os.path.exists(ns_path):
         flist = Dir.show(ns_path, '*.py')
         for fname in flist:
             module = Module(fname, ident, inherited, force)
             if len(module) > 0: self[module._module_desc_.name] = module
Exemple #4
0
 def __init__(self,
              ns_path,
              ident=None,
              inherited=None,
              force=False,
              **kargs):
     M.__init__(self, **kargs)
     self._namespace_desc_ = M()
     self._namespace_desc_['name'] = os.path.split(ns_path)[-1]
     self._namespace_desc_['path'] = ns_path
     self._namespace_desc_['ident'] = ident
     self._namespace_desc_['inherited'] = inherited
     if os.path.exists(ns_path):
         flist = Dir.show(ns_path, '*.py')
         for fname in flist:
             module = Module(fname, ident, inherited, force)
             if len(module) > 0: self[module._module_desc_.name] = module