Skip to content

Instantly share code, notes, and snippets.

@directmeasure
Created March 8, 2012 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save directmeasure/2003619 to your computer and use it in GitHub Desktop.
Save directmeasure/2003619 to your computer and use it in GitHub Desktop.
MODULE_LIST = filter(lambda m: getattr(m, 'CAN_USE', True), [
__import__('forum_modules.%s' % f, globals(), locals(), ['forum_modules'])
for f in os.listdir(MODULES_FOLDER)
if os.path.isdir(os.path.join(MODULES_FOLDER, f)) and
os.path.exists(os.path.join(MODULES_FOLDER, "%s/__init__.py" % f)) and
not f in DISABLED_MODULES
])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment