Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: None  |  size: 0.36 KB  |  hits: 12  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. MODULE_LIST = filter(lambda m: getattr(m, 'CAN_USE', True), [
  2.         __import__('forum_modules.%s' % f, globals(), locals(), ['forum_modules'])
  3.         for f in os.listdir(MODULES_FOLDER)
  4.         if os.path.isdir(os.path.join(MODULES_FOLDER, f)) and
  5.            os.path.exists(os.path.join(MODULES_FOLDER, "%s/__init__.py" % f)) and
  6.            not f in DISABLED_MODULES
  7. ])