-def modhas(modname, attname): return getattr(self.modules[modname], attname, None) is not None
+def modhas(modname, attname): return getattr(modules[modname], attname, None) is not None
+
+def load(parent, modname, dependent=False):
+ #wrapper to call _load and print return
+ if dependent:
+ print "(Loading dependency %s..." % (modname),
+ else:
+ print "%09.3f [MOD] [?] Loading %s..." % (time.time() % 100000, modname),
+ modstatus = _load(parent, modname, dependent)
+ if not modstatus:
+ if dependent:
+ print "failed: %s)" % (modstatus),
+ else:
+ print "failed: %s." % (modstatus)
+ elif modstatus == True:
+ if dependent:
+ print "OK)",
+ else:
+ print "OK."
+ else:
+ if dependent:
+ print "OK: %s)" % (modstatus),
+ else:
+ print "OK: %s." % (modstatus)
+ return modstatus