Servidor Seguro (SSL) - Dinahosting
Servidor Seguro (SSL) - Dinahosting
Servidor Seguro (SSL) - Dinahosting
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
d[‘type’] = desc[2]<br />
d[‘doc’]=’’<br />
Manual de usuario - Panel de Control 54<br />
if os.path.dirname(pathname):<br />
d[‘path’] = self.get_package_init_path(pkgname,<br />
pathname)<br />
else:<br />
# For built-in modules<br />
d[‘path’]=pathname<br />
if M:<br />
if M.__doc__:<br />
# Set doc string<br />
d[‘doc’] = M.__doc__<br />
else:<br />
pkgfile = ‘’<br />
# Load comments from the package file<br />
# if any.<br />
if d[‘type’] == PY_SOURCE:<br />
pkgfile = d[‘path’]<br />
elif d[‘type’] == PKG_DIRECTORY:<br />
if os.path.isfile(d[‘path’]):<br />
pkgfile = d[‘path’]<br />
if pkgfile:<br />
d[‘doc’] = self.load_comments(pkgfile)<br />
return d<br />
except ImportError, e:<br />
if len(packages)>1:<br />
try:<br />
result = find_module(top_level, self.paths)<br />
if result:<br />
of, pathname, desc = result<br />
try:<br />
M = load_module(top_level, of, pathname, desc)<br />
# Remove the top_level package from the name<br />
pkgname = reduce(lambda x,y: x+’.’+y, packages[1:])<br />
# Call this recursively<br />
if hasattr(M, ‘__path__’):<br />
return self.find_package(pkgname, M.__path__)<br />
except ImportError, e:<br />
pass<br />
except Exception, e:<br />
pass<br />
except ImportError, e:<br />
pass<br />
else:<br />
pass