'return all modules in a category. Also filter by os if system is not None'

def get_modules_by_category(self, category, system=None):

    if (system is None):
        return self.categories[category]
    else:
        l = []
        for mod in self.categories[category]:
            if (system in mod.compatible_systems):
                l.append(mod)
        return l
