def module_enabled(extlist, modname):
 extlist = [ext for ext in extlist if (ext.name == modname)]
 return len(extlist)

def module_enabled ( extlist , modname ) : extlist = [ ext for ext in extlist if ( ext . name == modname ) ] return len ( extlist )
require an apache module to be enabled .